diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -3167,10 +3167,7 @@ int ret; if ((ret = pfctl_get_eth_rulesets_info(dev, &ri, anchorname)) != 0) { - if (ret == ENOENT) - fprintf(stderr, "Anchor '%s' not found.\n", - anchorname); - else + if (ret != ENOENT) errc(1, ret, "DIOCGETETHRULESETS"); return (-1); } diff --git a/tests/sys/netpfil/pf/anchor.sh b/tests/sys/netpfil/pf/anchor.sh --- a/tests/sys/netpfil/pf/anchor.sh +++ b/tests/sys/netpfil/pf/anchor.sh @@ -157,10 +157,10 @@ atf_check -s exit:0 -o \ inline:" foo\n foo/bar\n foo/bar/foobar\n foo/bar/quux\n foo/baz\n foo/qux\n" \ - -e ignore jexec alcatraz pfctl -sA + jexec alcatraz pfctl -sA atf_check -s exit:0 -o inline:" foo/bar/foobar\n foo/bar/quux\n" \ - -e ignore jexec alcatraz pfctl -a foo/bar -sA + jexec alcatraz pfctl -a foo/bar -sA } deeply_nested_cleanup()