Page MenuHomeFreeBSD

Merge r281164
ClosedPublic

Authored by kp on Jun 15 2015, 10:24 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mar 28 2024, 8:19 AM
Unknown Object (File)
Feb 11 2024, 1:38 PM
Unknown Object (File)
Dec 27 2023, 11:15 PM
Unknown Object (File)
Dec 21 2023, 9:43 AM
Unknown Object (File)
Dec 20 2023, 12:03 AM
Unknown Object (File)
Oct 30 2023, 3:10 AM
Unknown Object (File)
Jun 26 2023, 11:26 PM
Unknown Object (File)
Jun 25 2023, 12:23 AM
Subscribers

Details

Summary

pf: Skip firewall for refragmented ip6 packets

In cases where we scrub (fragment reassemble) on both input and output
we risk ending up in infinite loops when forwarding packets.

Fragmented packets come in and get collected until we can defragment. At
that point the defragmented packet is handed back to the ip stack (at
the pfil point in ip6_input(). Normal processing continues.

Eventually we figure out that the packet has to be forwarded and we end
up at the pfil hook in ip6_forward(). After doing the inspection on the
defragmented packet we see that the packet has been defragmented and
because we're forwarding we have to refragment it.

In pf_refragment6() we split the packet up again and then ip6_forward()
the individual fragments. Those fragments hit the pfil hook on the way
out, so they're collected until we can reconstruct the full packet, at
which point we're right back where we left off and things continue until
we run out of stack.

Break that loop by marking the fragments generated by pf_refragment6()
as M_SKIP_FIREWALL. There's no point in processing those packets in the
firewall anyway. We've already filtered on the full packet.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kp retitled this revision from to Merge r281164.
kp updated this object.
kp edited the test plan for this revision. (Show Details)
kp added reviewers: gnn, philip.
kp set the repository for this revision to rS FreeBSD src repository - subversion.
gnn edited edge metadata.
This revision is now accepted and ready to land.Jun 16 2015, 12:51 PM
This revision was automatically updated to reflect the committed changes.