HomeFreeBSD

frag6: handling of overlapping fragments to conform to RFC 8200

Description

frag6: handling of overlapping fragments to conform to RFC 8200

While the comment was updated in r350746, the code was not.
RFC8200 says that unless fragment overlaps are exact (same fragment
twice) not only the current fragment but the entire reassembly queue
for this packet must be silently discarded, which we now do if
fragment offset and fragment length do not match.

Obtained from: jtl
MFC after: 3 weeks
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D16850

Event Timeline

RFC 8200, page 22 says "no ICMP error messages should be sent" for overlapping fragments. But frag6_freef() will send ICMP6_TIME_EXCEED_REASSEMBLY packet, if overlapping fragment is first fragment. Can be tested by sending the 2nd fragment (overlapping) first, then 1st fragment.

So, we need a way to tell frag6_freef() to skip sending this ICMP6 Error packet. Other places of the code also will benefit from this feature.