Date: Fri, 14 Feb 2025 17:50:26 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: a2614574f245 - main - pfctl: if_item can be "any" now Message-ID: <202502141750.51EHoQEk061411@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=a2614574f2459ef56013061a185880f90e035ce4 commit a2614574f2459ef56013061a185880f90e035ce4 Author: Kristof Provost <kp@FreeBSD.org> AuthorDate: 2025-02-11 10:06:53 +0000 Commit: Kristof Provost <kp@FreeBSD.org> CommitDate: 2025-02-14 17:47:52 +0000 pfctl: if_item can be "any" now Allows things like: block out on $someif received-on any to prevent packets to get forwarded to $someif. Obtained from: OpenBSD, henning <henning@openbsd.org>, 5984d04852 Sponsored by: Rubicon Communications, LLC ("Netgate") --- sbin/pfctl/parse.y | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y index 981039f4124c..b370cbc463ae 100644 --- a/sbin/pfctl/parse.y +++ b/sbin/pfctl/parse.y @@ -3379,6 +3379,15 @@ if_item : STRING { $$->next = NULL; $$->tail = $$; } + | ANY { + $$ = calloc(1, sizeof(struct node_if)); + if ($$ == NULL) + err(1, "if_item: calloc"); + strlcpy($$->ifname, "any", sizeof($$->ifname)); + $$->not = 0; + $$->next = NULL; + $$->tail = $$; + } ; af : /* empty */ { $$ = 0; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202502141750.51EHoQEk061411>