plan9fox/sys
cinap_lenrek 5b972a9aea devip: fix ip fragmentation handling issues with header options
some protocols assume that Ip4hdr.length[] and Ip6hdr.ploadlen[]
are valid and not out of range within the block but this has
not been verified. also, the ipv4 and ipv6 headers can have variable
length options, which was not considered in the fragmentation and
reassembly code.

to make this sane, ipiput4() and ipiput6() now verify that everything
is in range and trims to block to the expected size before it does
any further processing. now blocklen() and Ip4hdr.length[] are conistent.

ipoput4() and ipoput6() are simpler now, as they can rely on
blocklen() only, not having a special routing case.

ip fragmentation reassembly has to consider that fragments could
arrive with different ip header options, so we store the header+option
size in new Ipfrag.hlen field.

unfraglen() has to make sure not to run past the buffer, and hadle
the case when it encounters multiple fragment headers.
2019-03-03 05:25:00 +01:00
..
doc
games/lib fortunes: [9fans] ..... UNSUBSCRIBE_HELP NEEDED 2018-12-11 12:57:36 -05:00
include libip: replace v4parsecidr() with new parseipandmask() 2019-02-11 23:26:57 +01:00
lib troff: fix -ms mug (thanks aksr) 2019-01-23 21:28:22 +01:00
man libip: replace v4parsecidr() with new parseipandmask() 2019-02-11 23:26:57 +01:00
src devip: fix ip fragmentation handling issues with header options 2019-03-03 05:25:00 +01:00