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)
Tue, Mar 11, 6:36 PM
Unknown Object (File)
Sun, Mar 2, 4:47 AM
Unknown Object (File)
Feb 19 2025, 12:14 PM
Unknown Object (File)
Feb 15 2025, 9:12 PM
Unknown Object (File)
Feb 14 2025, 9:02 AM
Unknown Object (File)
Feb 11 2025, 1:07 PM
Unknown Object (File)
Feb 11 2025, 1:04 PM
Unknown Object (File)
Feb 11 2025, 7:28 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.