Page MenuHomeFreeBSD

pf: Always skip outbound filtering for inbound af-to rules
ClosedPublic

Authored by vegeta_tuxpowered.net on Sep 9 2025, 1:20 PM.
Tags
None
Referenced Files
F133777822: D52446.diff
Tue, Oct 28, 8:32 AM
Unknown Object (File)
Sun, Oct 26, 6:16 AM
Unknown Object (File)
Fri, Oct 17, 9:56 PM
Unknown Object (File)
Fri, Oct 17, 9:18 PM
Unknown Object (File)
Sat, Oct 11, 5:22 AM
Unknown Object (File)
Sat, Oct 11, 5:22 AM
Unknown Object (File)
Sat, Oct 11, 5:22 AM
Unknown Object (File)
Fri, Oct 10, 10:09 PM

Details

Summary

The af-to rules on inbound direction create a single state spanning both the
inbound and the outbound interface. Calling pf_test() for the outbound
direction in pf_route() makes the packet pass through state search, match
the existing state, never evaluate the ruleset, and increase state counters.

Check that the state comes from an af-to rule in inbound direction, and if
yes, skip outbound testing.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped