Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Aug 2022 07:17:22 GMT
From:      Kristof Provost <kp@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: c9554c4df514 - stable/12 - pfctl: fix FOM_ICMP/POM_STICKYADDRESS clash
Message-ID:  <202208200717.27K7HMvd021010@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/12 has been updated by kp:

URL: https://cgit.FreeBSD.org/src/commit/?id=c9554c4df51481a5826111c9ca15a1e28b3d5ba5

commit c9554c4df51481a5826111c9ca15a1e28b3d5ba5
Author:     Franco Fichtner <franco@opnsense.org>
AuthorDate: 2022-08-06 08:59:56 +0000
Commit:     Kristof Provost <kp@FreeBSD.org>
CommitDate: 2022-08-20 07:14:31 +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
    
    (cherry picked from commit 1e73fbd8b28946cb1341b51292082864943f0a89)
---
 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 09bda751d356..1e65bcb6a9b3 100644
--- a/sbin/pfctl/parse.y
+++ b/sbin/pfctl/parse.y
@@ -4075,7 +4075,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;
 			}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202208200717.27K7HMvd021010>