pfctl: Do not warn if there is no Ethernet anchor
Avoid emitting a warning if there is no Ethernet anchor. If the anchor --regardless of its type-- is nonexistent, should be caught earlier. This can be misleading when there is a layer 3 anchor but not an Ethernet anchor, giving the user the impression that there is no layer 3 anchor with that name. PR: 280516 Approved by: kp MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D53360
This commit is contained in:
+1
-4
@@ -3167,10 +3167,7 @@ pfctl_show_eth_anchors(int dev, int opts, char *anchorname)
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -157,10 +157,10 @@ deeply_nested_body()
|
||||
|
||||
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()
|
||||
|
||||
Reference in New Issue
Block a user