Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Mar 2026 01:11:23 +0000
From:      Philip Paeps <philip@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Cc:        Kristof Provost <kp@FreeBSD.org>
Subject:   git: d9f9b4268f28 - releng/15.0 - pfctl: always warn if a duplicate rule was detected
Message-ID:  <69c487bb.19301.19d17f23@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch releng/15.0 has been updated by philip:

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

commit d9f9b4268f28c5d47fc3726f525a5715eefabc76
Author:     Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2026-03-12 14:24:42 +0000
Commit:     Philip Paeps <philip@FreeBSD.org>
CommitDate: 2026-03-25 16:06:21 +0000

    pfctl: always warn if a duplicate rule was detected
    
    Approved by:    so
    Security:       FreeBSD-SA-26:09.pf
    Security:       CVE-2026-4748
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
    
    (cherry picked from commit 66d66dd0f6f83926980fc1d68dd366c0057350c5)
    (cherry picked from commit e224b9b867f4e7de959afaa63d56672e13d7c454)
---
 sbin/pfctl/pfctl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c
index 36bdd9705830..a8a393cf2949 100644
--- a/sbin/pfctl/pfctl.c
+++ b/sbin/pfctl/pfctl.c
@@ -2189,13 +2189,13 @@ pfctl_load_rule(struct pfctl *pf, char *path, struct pfctl_rule *r, int depth)
 		}
 	}
 
-	if (pf->opts & PF_OPT_VERBOSE) {
+	if (pf->opts & PF_OPT_VERBOSE || was_present) {
 		INDENT(depth, !(pf->opts & PF_OPT_VERBOSE2));
 		print_rule(r, name,
 		    pf->opts & PF_OPT_VERBOSE2,
 		    pf->opts & PF_OPT_NUMERIC);
 		if (was_present)
-			printf(" -- rule was already present");
+			printf(" -- rule was already present\n");
 	}
 	path[len] = '\0';
 	pfctl_clear_pool(&r->rdr);


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69c487bb.19301.19d17f23>