Date: Wed, 28 May 2025 21:55:50 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: 8801e3adff00 - main - pfctl: don't check np->port for NULL Message-ID: <202505282155.54SLtowk054931@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=8801e3adff004f9facb16b0e3dffbf68f3ac1365 commit 8801e3adff004f9facb16b0e3dffbf68f3ac1365 Author: Kristof Provost <kp@FreeBSD.org> AuthorDate: 2025-05-26 09:24:39 +0000 Commit: Kristof Provost <kp@FreeBSD.org> CommitDate: 2025-05-28 21:40:36 +0000 pfctl: don't check np->port for NULL It's an array, it's never NULL. OK bluhm@ Obtained from: OpenBSD, akfaew <akfaew@openbsd.org>, abfef119a6 Sponsored by: Rubicon Communications, LLC ("Netgate") --- sbin/pfctl/parse.y | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y index befa5a9b0d39..3ddf391810c6 100644 --- a/sbin/pfctl/parse.y +++ b/sbin/pfctl/parse.y @@ -6091,7 +6091,7 @@ apply_rdr_ports(struct pfctl_rule *r, struct pfctl_pool *rpool, struct redirspec rpool->proxy_port[0] = ntohs(rs->rport.a); - if (!rs->rport.b && rs->rport.t && r->dst.port != NULL) { + if (!rs->rport.b && rs->rport.t) { rpool->proxy_port[1] = ntohs(rs->rport.a) + (ntohs(r->dst.port[1]) - ntohs(r->dst.port[0])); } else
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202505282155.54SLtowk054931>