Date: Wed, 20 Apr 2022 11:05:43 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: a16732d670fa - main - pfctl: always print 'l3' source/destination Message-ID: <202204201105.23KB5h50042458@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=a16732d670fa6013bc085a5f9bf6b8d2c208de98 commit a16732d670fa6013bc085a5f9bf6b8d2c208de98 Author: Kristof Provost <kp@FreeBSD.org> AuthorDate: 2022-04-12 11:29:56 +0000 Commit: Kristof Provost <kp@FreeBSD.org> CommitDate: 2022-04-20 11:01:12 +0000 pfctl: always print 'l3' source/destination While the kernel only performs the L3 check for ETHERTYPE_IP/ETHERTYPE_IP6 we should always print the source and destination addresses. Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D34918 --- sbin/pfctl/pfctl_parser.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/sbin/pfctl/pfctl_parser.c b/sbin/pfctl/pfctl_parser.c index 1bd95b076ce6..1f6a194591c0 100644 --- a/sbin/pfctl/pfctl_parser.c +++ b/sbin/pfctl/pfctl_parser.c @@ -783,12 +783,10 @@ print_eth_rule(struct pfctl_eth_rule *r, const char *anchor_call, printf(" to "); print_eth_addr(&r->dst); } - if (r->proto == ETHERTYPE_IP || r->proto == ETHERTYPE_IPV6) { - printf(" l3"); - print_fromto(&r->ipsrc, PF_OSFP_ANY, &r->ipdst, - r->proto == ETHERTYPE_IP ? AF_INET : AF_INET6, 0, - 0, 0); - } + printf(" l3"); + print_fromto(&r->ipsrc, PF_OSFP_ANY, &r->ipdst, + r->proto == ETHERTYPE_IP ? AF_INET : AF_INET6, 0, + 0, 0); if (r->qname[0]) printf(" queue %s", r->qname); if (r->tagname[0])
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202204201105.23KB5h50042458>