Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Jun 2025 09:54:40 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: e56247e0debc - main - pfctl: Stop checking table commands for `create'
Message-ID:  <202506300954.55U9se5c064525@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=e56247e0debc96bb4d5082c289bb8538978d3725

commit e56247e0debc96bb4d5082c289bb8538978d3725
Author:     Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2025-06-27 09:17:58 +0000
Commit:     Kristof Provost <kp@FreeBSD.org>
CommitDate: 2025-06-30 07:54:01 +0000

    pfctl: Stop checking table commands for `create'
    
    Tiny left over from 2003 when it was removed. Twist the logic by checking
    for `show' and `test' to make it even simpler.
    
    OK sashan henning
    
    Obtained from:  OpenBSD, kn <kn@openbsd.org>, 764778e2ff
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
---
 sbin/pfctl/pfctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c
index 8435f69e91e0..8b76b0c3fdfd 100644
--- a/sbin/pfctl/pfctl.c
+++ b/sbin/pfctl/pfctl.c
@@ -3183,7 +3183,7 @@ main(int argc, char *argv[])
 			loadopt |= PFCTL_FLAG_TABLE;
 			tblcmdopt = NULL;
 		} else
-			mode = strchr("acdefkrz", ch) ? O_RDWR : O_RDONLY;
+			mode = strchr("st", ch) ? O_RDONLY : O_RDWR;
 	} else if (argc != optind) {
 		warnx("unknown command line argument: %s ...", argv[optind]);
 		usage();



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