git: 1e73fbd8b289 - main - pfctl: fix FOM_ICMP/POM_STICKYADDRESS clash
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 06 Aug 2022 14:43:12 UTC
The branch main has been updated by kp:
URL: https://cgit.FreeBSD.org/src/commit/?id=1e73fbd8b28946cb1341b51292082864943f0a89
commit 1e73fbd8b28946cb1341b51292082864943f0a89
Author: Franco Fichtner <franco@opnsense.org>
AuthorDate: 2022-08-06 08:59:56 +0000
Commit: Kristof Provost <kp@FreeBSD.org>
CommitDate: 2022-08-06 12:22:42 +0000
pfctl: fix FOM_ICMP/POM_STICKYADDRESS clash
pass inet proto icmp icmp-type {unreach}
pass route-to (if0 127.0.0.1/8) sticky-address inet
The wrong struct was being tested. The parser tries to prevent
"sticky-address sticky-address" syntax but was actually cross-rule
enforcing that ICMP filter cannot be before the use of "sticky-address"
in next rule.
MFC after: 2 weeks
Reviewed by: kp
Differential Revision: https://reviews.freebsd.org/D36050
---
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 506716bca689..7bb6223319c4 100644
--- a/sbin/pfctl/parse.y
+++ b/sbin/pfctl/parse.y
@@ -4466,7 +4466,7 @@ pool_opt : BITMASK {
pool_opts.staticport = 1;
}
| STICKYADDRESS {
- if (filter_opts.marker & POM_STICKYADDRESS) {
+ if (pool_opts.marker & POM_STICKYADDRESS) {
yyerror("sticky-address cannot be redefined");
YYERROR;
}