aboutsummaryrefslogtreecommitdiff
path: root/sbin/pfctl/parse.y
diff options
context:
space:
mode:
authorFranco Fichtner <franco@opnsense.org>2022-08-06 08:59:56 +0000
committerKristof Provost <kp@FreeBSD.org>2022-08-06 12:22:42 +0000
commit1e73fbd8b28946cb1341b51292082864943f0a89 (patch)
treeecbb78acb775d83da377e9b1ae14af2db9531d34 /sbin/pfctl/parse.y
parent93dd3adac7d84528c4ba4b0c3992931a38dbbc24 (diff)
downloadsrc-1e73fbd8b28946cb1341b51292082864943f0a89.tar.gz
src-1e73fbd8b28946cb1341b51292082864943f0a89.zip
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
Diffstat (limited to 'sbin/pfctl/parse.y')
-rw-r--r--sbin/pfctl/parse.y2
1 files changed, 1 insertions, 1 deletions
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;
}