Page MenuHomeFreeBSD

pf: Fix tests broken by enabling inet-local filtering
ClosedPublic

Authored by dfr on Jun 2 2023, 5:01 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jul 26, 3:10 AM
Unknown Object (File)
Wed, Jul 16, 11:37 PM
Unknown Object (File)
Sun, Jul 6, 8:34 AM
Unknown Object (File)
Jun 28 2025, 8:18 PM
Unknown Object (File)
Jun 28 2025, 12:58 PM
Unknown Object (File)
Jun 25 2025, 8:51 AM
Unknown Object (File)
Jun 24 2025, 8:56 AM
Unknown Object (File)
Jun 23 2025, 12:25 PM

Details

Summary

Three of the pf dummynet tests were using filter rules which matched
both the intended epair interface as well as lo0 which now receives
PFIL_OUT events for messages delivered to the local network stack (if
enabled). This commit changes the rules to match only for the expected
epair interface.

PR: 268717

Test Plan

kyua test -k /usr/tests/Kyuafile sys/netpfil/common/dummynet

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 51863
Build 48754: arc lint + arc unit

Event Timeline

dfr requested review of this revision.Jun 2 2023, 5:01 PM

That's a little unexpected, but given that it'd only happen when the (currently) non-default hook is enabled that fine.
It's also pretty common for users to have a 'set skip on lo' rule, which I assume would prevent this too.

This revision is now accepted and ready to land.Jun 3 2023, 9:55 AM

I actually tried adding a 'skip on lo' rule to these tests but for some reason the dnpipe rules still matched. Possibly i had the rule ordering wrong or needed 'skip quick on lo' instead. In real-world scenarios, I don't think this is likely to be a widespread problem and I still would like to move forward with D40373.