Page MenuHomeFreeBSD

Merge r281164
ClosedPublic

Authored by kp on Jun 15 2015, 10:24 AM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 17 2025, 11:45 AM
Unknown Object (File)
Dec 18 2024, 5:46 AM
Unknown Object (File)
Oct 2 2024, 7:00 AM
Unknown Object (File)
Oct 1 2024, 10:44 AM
Unknown Object (File)
Sep 28 2024, 6:17 AM
Unknown Object (File)
Sep 28 2024, 3:02 AM
Unknown Object (File)
Sep 23 2024, 9:13 AM
Unknown Object (File)
Sep 23 2024, 9:13 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.