[Bug 297839] pf: "pfctl -a 'someanchor/*' -sr" is non-functional

From: <bugzilla-noreply_at_freebsd.org>
Date: Mon, 24 Aug 2026 10:27:35 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=297839

            Bug ID: 297839
           Summary: pf: "pfctl -a 'someanchor/*' -sr" is non-functional
           Product: Base System
           Version: 15.1-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: pf@FreeBSD.org
          Reporter: ivy@FreeBSD.org

in pf.conf:

anchor "jail/*"

in pfctl:

--->o---
# pfctl -a jail/www -sr
pass in proto tcp from <lf> to <addrs> port = smtp flags S/SA keep state
pass in proto tcp from any to <addrs> port = ftp flags S/SA keep state
pass in proto tcp from any to <addrs> port = ftps flags S/SA keep state
pass in proto tcp from any to <addrs> port = http flags S/SA keep state
pass in proto tcp from any to <addrs> port = https flags S/SA keep state
pass in proto tcp from any to <addrs> port 50000:50100 flags S/SA keep state
pass in on vm.www from <addrs> to any flags S/SA keep state

# pfctl -a jail/ns -sr
pass in proto tcp from <lf> to <addrs> port = smtp flags S/SA keep state
pass in proto tcp from <lf> to <addrs> port = domain flags S/SA keep state
pass in proto tcp from <lf> to <addrs> port = domain-s flags S/SA keep state
pass in proto udp from <lf> to <addrs> port = domain keep state
pass in proto udp from <lf> to <addrs> port = domain-s keep state
pass in on vm.ns from <addrs> to any flags S/SA keep state

# pfctl -a 'jail/*' -sr
#
--->o---

according to pfctl(8), under the description of the '-a' flag, this should
work.

"pfctl -a '*' -sr" does work and shows all recursive anchors, including under
jail/*:

--->o---
# pfctl -a '*' -sr
block return in log all
pass out all flags S/SA keep state (if-bound)
anchor "jail/*" all {
  anchor "ldap3" all {
    pass in proto tcp from <lf> to <addrs> port = smtp flags S/SA keep state
    pass in proto tcp from <lf> to <addrs> port = ldap flags S/SA keep state
[...]
--->o---

-- 
You are receiving this mail because:
You are the assignee for the bug.