Commit graph

6535 commits

Author SHA1 Message Date
aiju 28c519295f games/mines -g: elements taken from list should be -2, not -1 2018-05-02 22:47:04 +00:00
cinap_lenrek 87d922589d ip/linklocal: invert the localadm bit from mac address instead of just setting it 2018-05-02 20:34:43 +02:00
cinap_lenrek 0c7a3ad1c9 remove ipv6on, update ipconfig(8) 2018-05-02 20:29:29 +02:00
cinap_lenrek 2247741fe0 ip/ipconfig: fix exit status for ndbconfig 2018-05-02 00:03:54 +02:00
cinap_lenrek cedf916289 termrc: fix mistake 2018-05-02 00:03:24 +02:00
cinap_lenrek 3ffbe35a20 termrc: put #u in front for endpoint renaming to be effective, handle multipe ether= tuples in ndb 2018-05-01 23:46:57 +02:00
cinap_lenrek 8f91d94d19 merge 2018-05-01 23:40:00 +02:00
cinap_lenrek 190c40c9ff ip/ipconfig: populate /net/ndb from v6 router advertisements, configure multiple addresses in ndbconfig()
we now update /net/ndb with the following information gathered
from router advertisements (rfc6106 and plan9 specific options):

- recursive dns servers (option 25, ndb: dns=)
- dns search list (option 31, ndb: dnsdomain=)
- plan9 fileserver (option 250, ndb: fs=)
- plan9 authserver (option 251, ndb: auth=)

note the plan9 specific options can be disabled with the -G flag.

for ndbconfig (-N flag), we now collect all ip addresses in ndb
belonging to the devices mac address and configue them all. v6
addresses are getting added when a link local address exists
or the -6 flag has been specified to automatically configure one.

move the dhcp code in its own dhcp.c file and make symbols static
that are not used across modules.
2018-05-01 23:32:28 +02:00
cinap_lenrek 8e53fe132e ndb/cs: fix crash in ndbredorder due to ndbnew() not maintaining the ->line ring
we have to maintain the ->line chain for ndbreorder() to work, so add
a little helper: ndbline() which replicates the ->entry chain and links
the last tuple to the first; makeing the whole list into a single line.
2018-05-01 22:17:27 +02:00
mischief d05b90f300 libplumb: allow attributes larger than 4096, set some malloc tags 2018-05-01 12:47:26 -07:00
cinap_lenrek bc4469e5d2 ndb/csquery: insert \n between read chunks 2018-04-28 04:40:09 +02:00
cinap_lenrek af3fd92789 ip/ppp: remove old struct 2018-04-28 04:39:09 +02:00
cinap_lenrek dbfb320566 libndb: cleanup 2018-04-28 04:38:34 +02:00
aiju e87ca8d976 mpdiv: fix dividing 0 by a small power of two 2018-04-26 14:55:02 +01:00
cinap_lenrek 69298c79ab merge 2018-04-24 21:25:16 +02:00
cinap_lenrek 5aae3d344b devip: improve arp and ndp code
there appears to be confusion about the refresh flag of arpenter().
when we get an arp reply, it makes more sense to just refresh
waiting/existing entries instead creating a new one as we do not
know if we are going to communicate with the remote host in the future.

when we see an arp request for ourselfs however, we want to always
enter the senders address into the arp cache as it is likely the sender
attempts to communicate with us and with the arp entry, we can reply
immidiately.

reject senders from multicast/broadcast mac addresses. thats just silly.

we can get rid of the multicast/broadcast ip checks in ethermedium and
do it in arpenter() instead, checking the route type for the target to
see if its a non unicast target.

enforce strict separation of interface's arp entries by passing a
rlock'd ifc explicitely to arpenter, which we compare against the route
target interface. this makes sure arp/ndp replies only affect entries for
the receiving interface.

handle neighbor solicitation retransmission in nbsendsol() only. that is,
both ethermedium and the rxmitproc just call nbsendsol() which maintains
the timers and counters and handles the rotation on the re-transmission
chain.
2018-04-24 20:21:09 +02:00
aiju 3c53021357 forp: fix ternary operator 2018-04-24 12:58:54 +01:00
aiju 29f03ba4e7 libsat, forp: fix va_list hack on amd64 2018-04-24 12:20:07 +01:00
cinap_lenrek 20b9326dad devip: fix ipv6 icmp unreachable handling, fix retransmit, fix ifc locking, remove tentative check 2018-04-22 18:54:13 +02:00
cinap_lenrek c80d94304d devip: cleanup ipmux.c 2018-04-22 18:50:45 +02:00
cinap_lenrek 8962551055 devip: increment in counter *AFTER* acquiering the ifc lock or loopbackmedium 2018-04-22 18:50:11 +02:00
cinap_lenrek dbf13129a7 devip: cleanup rudp.c 2018-04-22 18:49:01 +02:00
cinap_lenrek 9860172fce devip: cleanup tcp.c 2018-04-22 18:48:32 +02:00
cinap_lenrek c5c613357e devip: cleanup udp.c 2018-04-22 18:48:08 +02:00
cinap_lenrek 26aca332bb devip: various icmp stuff
no need to rlock ifc in targetttype() as we are called from icmpiput6(),
which the ifc rlocked.

for icmpadvise, the lport, destination *AND* source have to match.

a connection gets a packet when the packets destination matches the source
*OR* the packets source matches the destination.
2018-04-22 18:47:19 +02:00
cinap_lenrek 575398eb9b devip: verify ifcid on routehint check, check Route.ref for free'd routes
v4lookup() and v6lookup() do not acquire the routelock, so it is
possible to hit routes that are on the freelist. to detect these,
we set ref to 0 and check for this case, avoiding overriding the ifc.

re-evaluate routes when the ifcid on the route hint doesnt match.
2018-04-22 18:42:22 +02:00
cinap_lenrek 638b4a1ec1 devip: add "reflect" ctl message, fix memory leaks in icmpv6, fix source address for icmpttlexceeded, cleanup 2018-04-19 01:08:51 +02:00
cinap_lenrek 691370a08d ip/ipconfig: always refresh ndb/cs and ndb/dns when adding or removing ip addresses 2018-04-19 01:01:39 +02:00
cinap_lenrek fc3c91d91f ndb/dnsquery, ndb/csquery: handle long lines 2018-04-19 01:00:12 +02:00
cinap_lenrek 94018b2130 fix parseip() error handling in ipconfig, ppp, tftpfs and dns 2018-04-17 01:34:10 +02:00
cinap_lenrek 48d117ed64 ndb/dns: remove single-ip-address assuptions 2018-04-17 00:48:42 +02:00
cinap_lenrek ac962a0ae4 ndb/cs: remove single-ip-address assumptions 2018-04-17 00:45:37 +02:00
cinap_lenrek 93ab48008e ip/ipconfig: use unique ip/ipmask/ipgw values close to match for ndbconfig 2018-04-15 00:07:42 +02:00
cinap_lenrek c4603260f8 ndb/cs: remove paranoia debug toggle 2018-04-14 20:32:26 +02:00
cinap_lenrek 1da5285c1e libc: allow /net/cs to specify local address for dial() 2018-04-14 20:28:58 +02:00
kremlin 8666ec6b55 add missing ethermii.h dependencies. patch from cinap_lenrek 2018-04-12 17:50:10 -04:00
cinap_lenrek 4354c401c1 cpurc: remove obsolete device binds, run diskparts after $sysname is known. remove /env/boottime. document. 2018-04-12 21:30:28 +02:00
cinap_lenrek 780c5dfd1a ip/ipconfig: setup per local address default routes 2018-04-11 22:57:16 +02:00
cinap_lenrek 874701d193 devip: make v4 ifc broadcast and multicast routes specific to address
this allows one to access the same network via multiple interfaces,
the local address then determines which interface is used.
2018-04-11 22:56:25 +02:00
cinap_lenrek eac7a2b12a ip/gping: icmpv6 support 2018-04-10 20:04:20 +02:00
cinap_lenrek 829a451c2b devip: properly initialize the connection ignoreadvice and tos flags 2018-04-10 20:02:03 +02:00
cinap_lenrek 0272fa04fd ip/traceroute: icmpv6 support 2018-04-10 19:06:34 +02:00
cinap_lenrek 3e60d7127d ip/ping: stop doing clever things with dialstrings, just let cs/dial figure it out 2018-04-10 00:56:50 +02:00
cinap_lenrek 4cda213a78 ip(3): troff magic 2018-04-08 22:22:03 +02:00
cinap_lenrek f692b73955 ip(3): document changes on /net/arp and /net/iproute 2018-04-08 22:11:18 +02:00
cinap_lenrek dac42bd005 ip/ipconfig: fix v6 ndp code, use source specific default routes 2018-04-08 21:16:29 +02:00
cinap_lenrek c2dd9b1da7 devip: implement source specific routing 2018-04-08 21:15:00 +02:00
cinap_lenrek dc8432d459 nusb/usbd: increase buffer size to capture port information
due to the addition of uframes property, the buffer got truncated
resulting in usbd not recognizing the number of roothub ports.
2018-04-08 20:51:48 +02:00
henesy 21c7c68307 remove duplicate -m definition in upasfs(4) (thanks rodri) 2018-04-06 18:05:25 -05:00
mischief 034d0b08e9 ape: improve assert macro
in a statement such as:

if(expr)
	assert(a);
else
	assert(b);

the previous definition of assert would fail to compile, as the else
would be dangling.  with a ternary expression, this construct works
fine.
2018-04-02 21:44:21 -07:00