Page MenuHomeFreeBSD

pf: Fix double ruleset evaluation for fragments sent to dummynet
ClosedPublic

Authored by vegeta_tuxpowered.net on Oct 2 2024, 7:28 PM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 9 2025, 3:31 AM
Unknown Object (File)
Feb 8 2025, 8:13 AM
Unknown Object (File)
Feb 6 2025, 6:42 AM
Unknown Object (File)
Jan 31 2025, 6:29 AM
Unknown Object (File)
Jan 30 2025, 9:27 PM
Unknown Object (File)
Jan 30 2025, 9:25 PM
Unknown Object (File)
Jan 26 2025, 6:07 PM
Unknown Object (File)
Jan 26 2025, 6:00 PM

Details

Summary

The function pf_setup_pdesc() handles ruleset evaluation for non-reassembled packets. Having it called before pf_mtag is checked for flags PF_MTAG_FLAG_ROUTE_TO and PF_MTAG_FLAG_DUMMYNET will cause loops for fragmented packets if reassembly is disabled.

Move pd zeroing and pf_mtag extraction from pf_setup_pdesc() to a separate function pf_init_pdesc() and change the order of function calls: first call pf_init_pdesc(), then check if the currently processed packet has been reinjected from dummynet, finally call pf_setup_pdesc().

Add functionality of sending UDP packets to pft_ping.py with fragmentation support and fix broken IPv6 reassembly.

Diff Detail

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

Event Timeline

This revision was not accepted when it landed; it landed in state Needs Review.Oct 3 2024, 11:58 AM
This revision was automatically updated to reflect the committed changes.