Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 04 Mar 2026 16:21:12 +0000
From:      Kristof Provost <kp@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Cc:        Seth Hoffert <seth.hoffert@gmail.com>
Subject:   git: 36acf1bd32ed - main - pfctl: consistency
Message-ID:  <69a85bf8.387c0.2f397e61@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by kp:

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

commit 36acf1bd32ed5749af4a9f735aeea1a3434fe42f
Author:     Seth Hoffert <seth.hoffert@gmail.com>
AuthorDate: 2026-03-03 21:56:45 +0000
Commit:     Kristof Provost <kp@FreeBSD.org>
CommitDate: 2026-03-04 16:20:34 +0000

    pfctl: consistency
    
    % pfctl -F ethernet
    Ethernet rules cleared
    
    % pfctl -s ethernet
    pfctl: Unknown show modifier 'ethernet'
    
    pfctl accepts 'ethernet' (or any prefix of it) in the -F flag but
    accepts only 'ether' (or any prefix of it) in the -s flag, which seems
    inconsistent.  This change brings the two to parity while remaining
    backwards compatible.
    
    Reviewed by:    kp
    MFC after:      2 weeks
    Signed-off-by: Seth Hoffert <seth.hoffert@gmail.com>
---
 sbin/pfctl/pfctl.8 | 2 +-
 sbin/pfctl/pfctl.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sbin/pfctl/pfctl.8 b/sbin/pfctl/pfctl.8
index 662f5a4b0f16..05a76641ca8d 100644
--- a/sbin/pfctl/pfctl.8
+++ b/sbin/pfctl/pfctl.8
@@ -456,7 +456,7 @@ When used together with
 .Nm
 will loop and show updated queue statistics every five seconds, including
 measured bandwidth and packets per second.
-.It Cm ether
+.It Cm ethernet
 Show the currently loaded Ethernet rules.
 When used together with
 .Fl v ,
diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c
index ee1b2202cc1d..87343f762842 100644
--- a/sbin/pfctl/pfctl.c
+++ b/sbin/pfctl/pfctl.c
@@ -305,7 +305,7 @@ struct pfctl_opt_id {
 };
 
 static const struct pfctl_opt_id showopt_list[] = {
-	{ "ether",		SHOWOPT_ETHER },
+	{ "ethernet",		SHOWOPT_ETHER },
 	{ "nat",		SHOWOPT_NAT },
 	{ "queue",		SHOWOPT_QUEUE },
 	{ "rules",		SHOWOPT_RULES },


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69a85bf8.387c0.2f397e61>