Commit graph

5901 commits

Author SHA1 Message Date
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
aiju
9632ff2381 forp(1): document [] and some bugs 2018-03-31 12:41:41 +00:00
aiju
20e695c178 forp: fix precedence for [] 2018-03-31 12:30:48 +00:00
qwx
7d18756b39 gb*: reverse savegame field polarity 2018-03-31 11:38:09 +02:00
qwx
84351ae4cb blit,c64,gb*: fix phaser coolant leak during resize 2018-03-31 11:37:25 +02:00
aiju
2fdd83c827 add forp(1) manpage 2018-03-28 20:49:39 +00:00
aiju
57edb0b2d4 sat.h: update to include satget 2018-03-28 20:36:04 +00:00
aiju
2ca54f6a26 forp: fix multiplication; change division to C semantics 2018-03-28 20:14:29 +00:00
aiju
382d37dbf0 add forp 2018-03-28 17:08:30 +00:00
aiju
80474f7f59 libsat: fix one of the satmore() bugs 2018-03-26 21:39:23 +00:00
Alex Musolino
586a24770c lock(2): fix typo 2018-03-23 11:34:39 +10:30
aiju
39dd26bf08 sat: satget: don't duplicate binary clauses 2018-03-22 13:35:52 +00:00
aiju
8389465f94 sat: satget: include unit literals 2018-03-22 13:15:44 +00:00
aiju
2e2ae33a47 sat: add satget 2018-03-22 12:46:04 +00:00
aiju
3cb5494b26 sshfs: usage 2018-03-20 20:51:04 +00:00
aiju
ef17e2a693 resample(1): document -n option 2018-03-20 20:31:25 +00:00
23hiro
992ed21419 man pages: SYNOPSYS typo 2018-03-20 18:24:26 +01:00
aiju
5d4a456ae6 libsat: setmalloctag, fix incorrect allocation size 2018-03-20 11:23:41 +00:00
cinap_lenrek
547f60b4c5 devip: pick source address for neighbor solicitations as of rfc4861 7.2.2, cleanup
rfc4861 7.2.2:

If the source address of the packet prompting the solicitation is the
same as one of the addresses assigned to the outgoing interface, that
address SHOULD be placed in the IP Source Address of the outgoing
solicitation.

this change adds ndbsendsol() which handles the source address selection
and also handles the arp table locking; avoiding access to the arp entry
after the arp table is unlocked.

cleanups:

- use ipmove() instead of memmove().
- useless extern qualifiers
2018-03-19 01:11:08 +01:00
cinap_lenrek
20cbb88e32 merge 2018-03-18 07:53:10 +01:00
cinap_lenrek
71f807873b devip: more v6 improvements
ipv4local() and ipv6local() now take remote address argument,
returning the closest local address to the source. this
implements the standartized source address selection rules
instead of just returning the first local v4 or v6 address.

the source address selection was broken for esp, rudp an udp,
blindly assuming ifc->lifc->local being a valid v4 address.
use ipv6local() instead.

the v6 routing code used to lookup source address route to
decide to drop the packet instead of checking the interface
on the destination route.

factor out the route hint from Conv and put it in Routehint
structure. avoiding stack bloat in v4 routing. implement the
same trick for v6 avoiding second route lookup in ipoput6.

fix memory leak in icmpv6 router solicitation handling.

remove old unfinished handling of multiple v6 routers. should
implement source specific routes instead.

avoid duplication, use common convipvers() function.

use isv4() instead of memcmp v4prefix.
2018-03-18 07:50:48 +01:00
cinap_lenrek
8ce98a0b32 ip/ipconfig: stop spamming the console about router receiving RA's 2018-03-18 07:31:09 +01:00
aiju
87df80019e add sat(1) command 2018-03-18 03:03:12 +00:00
aiju
d68417bc01 satmore: don't try to override user defined variables 2018-03-18 03:01:21 +00:00
aiju
9f18b0f388 add #pragma incomplete to sat.h 2018-03-18 01:15:07 +00:00
mischief
c3c7429dc2 nusb/ptp: set storage name to their human readable description string 2018-03-17 15:06:13 -07:00
cinap_lenrek
c96fb5471a devusb: fix format print warnings for ep->ntds and ep->uframes 2018-03-17 21:55:39 +01:00
cinap_lenrek
4d59f9bd1a camv: fix display locking issues 2018-03-17 21:27:07 +01:00
aiju
c2c9562e3c add libsat 2018-03-17 19:26:26 +00:00
aiju
e0be49d7f1 mines(1): fix misleading HISTORY wording 2018-03-17 19:07:50 +00:00
cinap_lenrek
2c1415277f pc64: fix _intrr(), avoid the linker moving _intrr() arround 2018-03-17 18:25:12 +01:00
cinap_lenrek
108063bc3a pc64: add magic _intrr() symbol for ktrace (thanks mischief) 2018-03-17 17:19:42 +01:00
qwx
199f090b6a devfs: revert commit 4000
induces a kernel panic under normal circumstances
2018-03-17 11:25:27 +02:00
qwx
372d359e28 kernel: let /rc/bin/diskparts attach #k after #S partitions are loaded up 2018-03-17 01:04:31 +02:00
qwx
14cd988a48 devfs: only set configed flag if config was read successfully
this is just to retry reading the configuration at least once after an error
2018-03-17 01:00:51 +02:00
cinap_lenrek
f8961199dd nvidia: add pci device id for GeForce 6200 AGB (thanks bitmapper) 2018-03-14 22:41:30 +01:00
aiju
7ca11774a1 games/mines: build a better ghost trap 2018-03-10 14:40:34 +00:00
aiju
b7d31909f6 mptod/dtomp: add to mp.h 2018-03-09 21:30:06 +00:00
aiju
b9a08958e2 mp: add mptod and dtomp 2018-03-09 20:51:28 +00:00
aiju
bf555abcc3 add camv 2018-03-07 20:45:19 +00:00
aiju
657f0ed99a nusb/cam: ctl message fixes 2018-03-07 20:44:55 +00:00
aiju
2da5e135dc add nusb/cam 2018-03-07 10:06:18 +00:00
aiju
a2d8dcfd82 usb lib: add maxpkt and ntds to Altc struct 2018-03-07 10:04:27 +00:00
aiju
56405e0919 usbehci: catch interrupt in tsleep 2018-03-07 08:45:06 +00:00
aiju
9226caf2a3 usbehci: add uframes control request to return uframes one at a time 2018-03-06 17:18:48 +00:00
cinap_lenrek
097879eace merge 2018-03-05 06:10:56 +01:00
cinap_lenrek
6f70699aec usbehci: fix medium- to low quality highspeed isochronous transfers
everything was broken. strting with hsinit not even chaining
the itd's into a ring. followed by broken buffer pointer pages.
finally, the interrupt handler's read transaction length
calculation was completely bugged, using the *FRAME* index
to access descriptors csw[] fields and not reseting tdi->ndata
thru the loop.

minor stuff:

iso->data needs to be freed with ctlr->dmafree()

put ival in iso->ival so ctl message cannot override the endpoints
pollival and screw up deallocation.
2018-03-05 06:09:31 +01:00
aiju
633397bfda sshfs: update qid and filename on Tcreate 2018-03-04 19:52:35 +00:00
cinap_lenrek
8e654cf761 merge 2018-03-04 06:12:37 +01:00
cinap_lenrek
53e1708bcb igfx: add support for T510 (thanks mycroftiv) 2018-03-04 06:10:45 +01:00
khm
891a8c4f2c manpages: shut up about tex (1) 2018-02-28 12:55:48 -08:00
glenda
59b31cccdb g: revert accidental change, document missing file type 2018-02-27 10:08:23 -05:00
glenda
60befe7df1 games/mix: fix incorrect line numbers 2018-02-26 22:39:49 -05:00
cinap_lenrek
d1c0f53fcd ns: remove left over vararg check pragma 2018-02-26 19:58:54 +01:00
cinap_lenrek
8a01033efc vmx: allow setting mac address of using ea:nnnnnnnnnnnn! prefix, use genrandom() to generate mac globally unique mac address 2018-02-25 21:11:41 +01:00
cinap_lenrek
6728a5ec23 devloopback: reassign device letter from #X to #λ to avoid collision with devvmx 2018-02-25 19:06:37 +01:00
cinap_lenrek
b2d7992025 kernel: properly handle bad attach specifiers
- only accept decimal for numeric device id's
- exclude negative device id's
- device id's out of range yield Enodev
2018-02-25 17:11:18 +01:00
aiju
d3f4786a1f mines: documentation and chronometric control of supernatural apparitions 2018-02-25 03:38:25 +00:00
aiju
4aff59b64c ghost in the minesweeper shell 2018-02-25 02:50:24 +00:00
cinap_lenrek
f0a314605f devether: remove (unimplemented) detach, allow device creation on attach
we allow devether to create ethernet cards on attach. this is useull
for virtual cards like the sink driver, so we can create a sink
by simply: bind -a '#l2:sink ea=112233445566' /net

the detach routine was never called, so remove it from the few drivers
that attempted to implement it.
2018-02-25 03:42:38 +01:00
cinap_lenrek
5560efb3db devip: fix crash on negative dev id on attach 2018-02-25 03:32:29 +01:00
cinap_lenrek
05cd5cb200 ns, devproc: quote path and spec arguments for /proc/$pid/ns, namespace(6) does support quoting 2018-02-25 03:24:31 +01:00