Date: Mon, 7 Aug 2023 18:00:13 GMT From: Kristof Provost <kp@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: f8b4f9aab5b7 - main - pfctl: optionally clarify which anchors are layer 3 and which are Ethernet Message-ID: <202308071800.377I0DdJ083864@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=f8b4f9aab5b7119e8e26bc5f75931e89df00df39 commit f8b4f9aab5b7119e8e26bc5f75931e89df00df39 Author: Kristof Provost <kp@FreeBSD.org> AuthorDate: 2023-08-07 17:45:22 +0000 Commit: Kristof Provost <kp@FreeBSD.org> CommitDate: 2023-08-07 17:59:50 +0000 pfctl: optionally clarify which anchors are layer 3 and which are Ethernet When listing anchors pfctl lists both 'regular' layer 3 anchors and Ethernet anchors. It's possible to have the same anchor name in both, which can be confusing. Mitigate this a little by explicitly marking where the Ethernet anchors start. Avoid breaking scripts by only doing this at the second level of verbosity. Sponsored by: Rubicon Communications, LLC ("Netgate") --- sbin/pfctl/pfctl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c index 09f29b1c601c..ea1812a3858d 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -3039,6 +3039,8 @@ main(int argc, char *argv[]) switch (*showopt) { case 'A': pfctl_show_anchors(dev, opts, anchorname); + if (opts & PF_OPT_VERBOSE2) + printf("Ethernet:\n"); pfctl_show_eth_anchors(dev, opts, anchorname); break; case 'r':
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202308071800.377I0DdJ083864>