summaryrefslogtreecommitdiff
path: root/sys/src/cmd/ip
AgeCommit message (Collapse)Author
2023-05-21ip/ppp: just use mtu requested from the peer.HEADfrontcinap_lenrek
the mtu negotiation seems wrong. it seems to assume that the peer requests a mtu to us, but actually this doesnt seem to be the case and if the peer doesnt request it, we'd always use Defmntu of 1450, no matter what we set on with -m option. instead, we use the mtu specified with -m option and always request it to the peer. if the peer requests a different mtu we use that instead. this at least gives some control and allows to just use the correct mtu from pppoe (1492).
2023-05-21ip/ppp, ip/pppoe: remove -e flag again (sorry)cinap_lenrek
This only works when we'r not already having a interface bound to that ethernet. Otherwise ipconfig can get confused and adds the addresses to the wrong interface.
2023-05-21ip/ppp, ip/pppoe: handle ipv6 address auto-configuration, call ip/ipconfigcinap_lenrek
Change ip/ppp to call ip/ipconfig to add and remove addresses to avoid duplicating code for removing ndb entries and handling default routes as well as allow ipv6 address auto-configuration.
2023-05-21ip/ipconfig: initial dhcpv6 support, clean default-routes and /net/ndb on removecinap_lenrek
This adds a very basic (probably wrong) DHCPv6 client, to handle the "managed"-flag in IPv6 router solicitations. We add -U option to pass the DHCPv6 client id as well as an -s flag to manually add a dns server (because ppp is going to call ipconfig to handle all the configuration and write-back to /net/ndb in the future). Have the remove command also remove default routes and /net/ndb entries. (needed by ppp).
2023-05-20ip/ppp: allow specifying pair of local and remote addresscinap_lenrek
for ipv6, we need to be able to set both v4 and v6 local and remote addresses: local4 local6 local4 remote4 local6 remote6 local4 local6 local6 local4 local4 local6 remote4 local6 local4 remote6 local4 remote4 local6 remote6 local6 remote6 local4 remote4
2023-05-15dhcp: fix out of bounds access in "ANDROID_METERED" fixcinap_lenrek
the previous change introduces a out of bounds access as it does not change n. it is also conceptually wrong because this routine is supposed to just verify the structure. as later getopts() is *NOT* going to deal with malfored TLV's. this actually replaces the android magic garbage with OBpad bytes, which getopts() later will handle correctly and makes sure the garbage is fully contained within the buffer boundaries. thanks sigrid for testing.
2023-05-14dhcp: skip android junk optionsOri Bernstein
2023-05-14ip/ppp: ipv6 support, cleanup routes, remove source filter, and morecinap_lenrek
establish ipv6 link-local addresses if supported. to get a full prefix, one would need to do dhcpv6 or using slaac configuration. this will come later. remove ipv4 default route on exit. maintain the entries in /net/ndb on ip change and also remove them on exit. dont filter source address, this should be done differently. fix various bugs in the option iteration loops. honour primary flag (it used to just ignore that and set it unasked in the code... what the hell...)
2023-05-12ftpfs: clarify usage and manpageVess Rebane
2023-05-10ip/pppoe: aaand the code ;)cinap_lenrek
2023-05-10ip/ppp: Implement echo request timeout, terminatecinap_lenrek
Send lcp echo request every 5 seconds and terminate if we do not get any reply after 12 seconds. On protocol termination, exit all the processes using a note and log a reason. Cleanup.
2023-03-30ip/httpd: fix duplicate array entry (thanks khayyam@cock.li)Alex Musolino
2022-12-12ip/dhcpclient: ignore icmp advice messagescinap_lenrek
2022-12-12ip/pptpd: use /fd instead of #dcinap_lenrek
2022-11-20snoopy: fix ipv6 option header parsing, add MLD messages to icmp6cinap_lenrek
2022-10-06acmed: remove obsolete ip/acmed.cIgor Böhm
Remove stale ip/acmed.c left over after move from ip/ to auth/ in d8a1437cf4d604b66faad24f274b447d85039d63.
2022-09-18snoopy: add "ippkt" protocol to demux ip packet interfaces without media header.cinap_lenrek
When using a packet interface, such as /net/ipifc/x as the packet-soucre, there is no media header and the ip protocol version has to be determined from the first byte. The ippkt protocol solves this, allowing one to decode both ipv4 and ipv6, such as: snoopy -h ippkt /net/ipifc/2
2022-09-10ip/tinc: fix ping pong racing causing recalcs and deleting nodesqwx
2022-08-13ip/ipconfig: we do not want icmp advice errors on our dhcp connectioncinap_lenrek
2022-06-16ip/dhcpd: quiet up syslogJacob Moody
the packet prints can be found through -d now.
2022-06-05ip/ipconfig: refactor plan9 vendor parsingJacob Moody
Unless ip/dhcpd is started with the -6 option, we only receive v4 addresses. If we do see the v6 options we should prefer them but should also make sure we grab the v4 addresses as a fallback. None of the v6 options should overwrite valid overrides given at the command line. Add our custom types to logging.
2022-06-05ip/dhcpd: properly skip past ipv6 addresses in addrsoptJacob Moody
If the first address passed happened to be an ipv6 address we would send a malformed option by never including a ipv4 address.
2022-04-19ip/sol: handle timeout on password entry for digest authcinap_lenrek
2022-04-18ip/torrent: fix silly readn() error check (thanks pr)cinap_lenrek
2022-04-03ip/sol: kvm (vnc) redirect, bring back plain authentication as a fallback ↵cinap_lenrek
(when unsupported)
2022-04-02ip/sol: use httpdigest authenticationcinap_lenrek
httpdigest authentication allows one to share the key in factotum with the amt webserver on https://target:16993
2022-04-01ip/sol: add intel AMT serial-over-lan console programcinap_lenrek
2022-03-18ip/dhcpd: ignore ipv6 addresses when looking up static bindingcinap_lenrek
2022-03-14ip(3): use flags instead of tag for 8 column route add/removecinap_lenrek
This avoids ipconfig having to explicitely specify the tag when we want to set route type, as the tag can be provided implicitely thru the "tag" command.
2022-03-13ip/dhcpd: ignore icmp advicecinap_lenrek
should ignore advice as we are handling all connections thru a single udp connection.
2022-03-13ipconfig(8): add -t flag to enable source address translationcinap_lenrek
2022-02-27snoopy: add vlan protocol (802.1q)cinap_lenrek
2022-02-05ip/tftpd: add -m argument for name substitution using regular expressionscinap_lenrek
This allows mapping incoming filenames to a different name using regular expressions, followed by subtitutions of the %[ICE] format strings. I needed this to have individual cmdline.txt files for netbooted raspberry pi's. In this example, i map cmdline.txt to %C, which gets substituted for /cfg/pxe/$ether of the client.
2021-11-03snoopy: dns: add caa record type, fix rrtypestr()cinap_lenrek
2021-11-03snoopy: adjust for new dns txt rr formatcinap_lenrek
2021-10-31tinc: fix typo in unknown host error messageqwx
2021-10-27acmed: reject -t flag when -e is given, dup stderr to stdout of -e cmdcinap_lenrek
2021-10-25acmed: tokenize domains from subject also with spaces (fixed multidom cert)cinap_lenrek
2021-10-25acmed: add external command flag -e, improvements, bugscinap_lenrek
- allow for external command to be run to install a challenge using -e flag - remove the challengedom argument, it is given by the subject in the csr - fix some filedescriptor leaks in error paths
2021-10-15acmed: import acme (RFC8555) clientOri Bernstein
2021-08-18snoopy: ... and fix the memory leak for new dns rr typescinap_lenrek
2021-08-18snoopy: fix dns nil pointer crashes when formating dns packets (thanks sl)cinap_lenrek
snoopy shares ndb/dns's dns parser code, but has its own copy of rralloc() function, which is responsible to allocating auxiolary data structures on an RR depending on the type. ndb/dns gained some support for some new types, but snoopy's copy of rralloc() was not updated, resulting the auxiolary structures to be nil, and the shared parsing routines crashes when trying to dereference them. this just syncs the copies, we might consider moving rralloc() into its own file so it can be completely shared.
2021-08-15tinc: fix spelling and update manpage (thanks unobe)cinap_lenrek
Update tinc(8) man page to: 1. state the implementation aligns with 1.0.36 of tinc.org; 2. use same hostname as mentioned in usage line. Fix typos in tinc.c.
2021-05-02ip/ftpd: Add explict and implicit FTPS support.foura
Removed: - Challenge reponse auth. - Noworld login. - Anonymous users writing files to /incoming.
2021-04-11ip/tftpd: add a syslog message about what error we return to the client on a NAKcinap_lenrek
2021-04-11ip/dhcpd: work around raspberry pi pxe firmware by providing dhcp option 66cinap_lenrek
The raspberry pi 4 PXE firmware insists on finding the tftp server address by parsing dhcp option 66 as an ip address string.
2021-04-11ip/ipconfig: ODtftpserver (dhcp option 66) is of type stringcinap_lenrek
2021-02-23ip/tftpd: add -n namespace-file flag (thanks sam-d)cinap_lenrek
tftpd currently unconditionally sets its namespace via /lib/namespace (newns("none", nil)), which stymied my attempts to pxe boot the openbsd installer without creating a real /etc dir on 9front, which would've been gross. I tried working around this with -h (and -r for good measure), but again hit issues because the namespace is rebuilt from scratch -- any binds of /386, /amd64, /cfg/pxe, etc. into the tftp-specific directory disappeared from tftpd's namespace and rendered my *9front* boxes unable to boot. I could maintain copies of the needed files in the tftp-specific directory, but that'd be kind of a drag. The following patch adds a -n flag to allow the specification of a namespace file in place of /lib/namespace; similar to ip/ftpd. I thought about setting up a /lib/namespace.tftp to act as a default rather than continuing to use /lib/namespace by default (which security-wise is about the same as allowing 9p mounts by user none, which I also have disabled), but I had trouble coming up with a sane default. Maybe someone more experienced would like to try that out. - sam-d
2021-02-23ip/tftpd: use procsetuser() instead of writing #c/usercinap_lenrek
2020-12-19libauth: change programs to use the new procsetuser() functioncinap_lenrek