Page MenuHomeFreeBSD

pfctl: Do not warn if there is no Ethernet anchor
ClosedPublic

Authored by jlduran on Oct 26 2025, 12:54 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Jan 14, 4:21 AM
Unknown Object (File)
Mon, Jan 12, 10:40 AM
Unknown Object (File)
Mon, Jan 12, 4:11 AM
Unknown Object (File)
Dec 2 2025, 10:27 AM
Unknown Object (File)
Nov 26 2025, 2:35 AM
Unknown Object (File)
Nov 23 2025, 10:09 AM
Unknown Object (File)
Nov 21 2025, 10:24 AM
Unknown Object (File)
Nov 19 2025, 5:55 AM

Details

Summary

Avoid emitting a warning if there is no Ethernet anchor. If the anchor
--regardless of its type-- is nonexistent, should be caught earlier.

PR: 280516

Diff Detail

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

Event Timeline

This is the simplest fix I can think of to fix PR 280516.
Feel free to commandeer, this or the parent revision. My main objective is to ship blocklist without defects or misleading warnings.

sbin/pfctl/pfctl.c
1240

I think this warning is also not needed. However, I don't know how to test this code path.

1577

I think this warning is also not needed. However, I don't know how to test this code path.

Thanks. I’ll try to review this (and your other patch) in the next days.

Part of the issue here is that we've got layer 3 and ethernet anchors and it's possible for an anchor to exist in one but not the other. So a pfctl -sA -a foo can be valid for one but not the other. I don't immediately see a better way of handling that than to just not raise errors either.

This revision is now accepted and ready to land.Oct 27 2025, 9:36 PM