HomeFreeBSD

frag6: properly handle atomic fragments according to RFCs.

Description

frag6: properly handle atomic fragments according to RFCs.

RFC 8200 says:
"If the fragment is a whole datagram (that is, both the Fragment

Offset field and the M flag are zero), then it does not need
any further reassembly and should be processed as a fully
reassembled packet (i.e., updating Next Header, adjust Payload
Length, removing the Fragment header, etc.).  .."

That means we should remove the fragment header and make all the adjustments
rather than just skipping over the fragment header. The difference should
be noticeable in that a properly handled atomic fragment triggering an ICMPv6
message at an upper layer (e.g. dest unreach, unreachable port) will not
include the fragment header.

Update the test cases to also test for an unfragmentable part. That is
needed so that the next header is properly updated (not just lengths).

MFC after: 3 weeks
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D22155

Details

Committed
bzNov 8 2019, 2:36 PM
Differential Revision
D22155: frag6: properly handle atomic fragments according to RFCs.
Parents
rS354541: csu: Fix dynamiclib/init_test:jcr_test on !HAVE_CTORS archs
Branches
Unknown
Tags
Unknown