The branch main has been updated by kp:

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

commit e56247e0debc96bb4d5082c289bb8538978d3725
Author:     Kristof Provost <k...@freebsd.org>
AuthorDate: 2025-06-27 09:17:58 +0000
Commit:     Kristof Provost <k...@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 <k...@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();

Reply via email to