Re: ifconfig -G broken in 14.2?

From: Michael Proto <mike_at_jellydonut.org>
Date: Tue, 15 Apr 2025 01:24:01 UTC
....mumbling to myself...

$ ifconfig -l
em0 lo0
$ ifconfig -a -G lo
em0: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP>
metric 0 mtu 1500

I failed to realize -G works when used in conjunction with -a, just
not alone or with -l (which is consistent with the man page). Sorry
for the noise.


-Michael Proto

On Mon, Apr 14, 2025 at 9:10 PM Michael Proto <mike@jellydonut.org> wrote:
>
> Trying to see if I have a bug here with interface groups. Per ifconfig(8):
>
>      -G groupname
>              Exclude members of the specified groupname from the output.
> ...
>      -g groupname
>              Limit the output to the members of the specified groupname.
>
>
> "ifconfig -g" works, "ifconfig -G" doesn't seem to in my environment.
>
> $ ifconfig -l
> em0 lo0
> $ ifconfig | grep group
> groups: lo
> $ ifconfig -g lo
> lo0
> $ ifconfig -G lo
> usage: ifconfig [-j jail] [-f type:format] [-g groupname] [-C] [-L]
> interface address_family
>                 [address [dest_address]] [parameters]
>        ifconfig [-j jail] interface create
>        ifconfig [-j jail] -a [-g groupname] [-C] [-L] [-d] [-m] [-u]
> [-v] [address_family]
>        ifconfig [-j jail] -l [-d] [-u] [address_family]
>        ifconfig [-j jail] [-g groupname] [-C] [-L] [-d] [-m] [-u] [-v]
>
> $ freebsd-version -rku
> 14.2-RELEASE-p1
> 14.2-RELEASE-p1
> 14.2-RELEASE-p3
> $ uname -rUp
> 14.2-RELEASE-p1 amd64 1402000
>
> On a VM, with additional interfaces/groups:
>
> $ ifconfig -l
> vtnet0 lo0 pflog0 wg1
> $ ifconfig | grep group
> groups: lo
> groups: pflog
> groups: wg
> $ ifconfig -g wg
> wg1
> $ ifconfig -G wg
> usage: ifconfig [-j jail] [-f type:format] [-g groupname] [-C] [-L]
> interface address_family
>                 [address [dest_address]] [parameters]
>        ifconfig [-j jail] interface create
>        ifconfig [-j jail] -a [-g groupname] [-C] [-L] [-d] [-m] [-u]
> [-v] [address_family]
>        ifconfig [-j jail] -l [-d] [-u] [address_family]
>        ifconfig [-j jail] [-g groupname] [-C] [-L] [-d] [-m] [-u] [-v]
> $ ifconfig -g pflog
> pflog0
> $ ifconfig -G pflog
> usage: ifconfig [-j jail] [-f type:format] [-g groupname] [-C] [-L]
> interface address_family
>                 [address [dest_address]] [parameters]
>        ifconfig [-j jail] interface create
>        ifconfig [-j jail] -a [-g groupname] [-C] [-L] [-d] [-m] [-u]
> [-v] [address_family]
>        ifconfig [-j jail] -l [-d] [-u] [address_family]
>        ifconfig [-j jail] [-g groupname] [-C] [-L] [-d] [-m] [-u] [-v]
>
> (same version info as above)
>
>
> Thanks,
> -Michael Proto