Page MenuHomeFreeBSD

pf: handle IPv6 fragmentation for route-to
ClosedPublic

Authored by kp on Nov 20 2024, 4:16 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 10, 4:34 AM
Unknown Object (File)
Sun, Nov 9, 10:32 PM
Unknown Object (File)
Sun, Nov 9, 9:13 PM
Unknown Object (File)
Sun, Nov 9, 1:43 PM
Unknown Object (File)
Sun, Nov 9, 1:10 PM
Unknown Object (File)
Sat, Nov 8, 10:11 PM
Unknown Object (File)
Sat, Nov 8, 2:27 AM
Unknown Object (File)
Sat, Nov 8, 1:07 AM

Details

Summary

If a fragmented IPv6 packet hits a route-to rule we have to first prevent
the pf_test(PF_OUT) check in pf_route6() from refragmenting (and calling
ip6_output()/ip6_forward()). We then have to refragment in pf_route6() and
transmit the packets on the route-to interface.

Split pf_refragment6() into two parts, the first to perform the refragmentation,
the second to call ip6_output()/ip6_forward() and call the former from
pf_route6().

Add a test case for route-to-ing fragmented IPv6 packets to verify this works
as expected.

Sponsored by: Rubicon Communications, LLC ("Netgate")

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kp requested review of this revision.Nov 20 2024, 4:16 PM

Change the approach. Tell pf_refragment6() what interface to use. If unspecified
fall back to the previous ip6_forward/ip6_output calls.
This is basically the same approach OpenBSD took for this issue, and it's a
smaller change than splitting pf_refragment6() into two functions.

This revision was not accepted when it landed; it landed in state Needs Review.Nov 26 2024, 2:07 PM
This revision was automatically updated to reflect the committed changes.