Page MenuHomeFreeBSD

ifconfig(8) unhide groups
ClosedPublic

Authored by feld on Nov 18 2014, 2:05 PM.
Tags
None
Referenced Files
F81653403: D1185.diff
Fri, Apr 19, 12:29 PM
Unknown Object (File)
Feb 22 2024, 1:29 AM
Unknown Object (File)
Jan 12 2024, 3:21 AM
Unknown Object (File)
Dec 19 2023, 6:34 PM
Unknown Object (File)
Aug 2 2023, 9:59 AM
Unknown Object (File)
Jul 15 2023, 4:29 PM
Unknown Object (File)
Jun 28 2023, 10:55 PM
Unknown Object (File)
Jun 28 2023, 10:50 PM
Subscribers

Details

Reviewers
glebius
des
Summary

ifconfig is hiding groups behind the verbose (-v) flag which I had no idea even existed. Groups were imported from OpenBSD some years ago, but for an unknown reason were hidden behind the verbose flag which is poorly documented. The verbose flag is documented as such:

The -v flag may be used to get more verbose status for an interface.

Groups are documented like so:

group group-name
        Assign the interface to a “group”.  Any interface can be in mul‐
        tiple groups.

        Cloned interfaces are members of their interface family group by
        default.  For example, a PPP interface such as ppp0 is a member
        of the PPP interface family group, ppp.

-group group-name
        Remove the interface from the given “group”.

The -g flag is available, but in order to use it you need to actually know what group you're looking for

ifconfig [-g groupname]

I think this is some poor usability and we can start by not being intentionally different than OpenBSD by hiding the "groups: " output from ifconfig.

I did a grep of the source for verbose to see how it is being used. It exposes the following bits of data:

  • lots of detailed 802.11 stuff
  • LAGG: lag id, state, peer format (LACP, etc)
  • groups

I'm not convinced it's worth hiding groups or LAGG behind the verbose flag, but I'm not concerned about LAGG at this time.

While here I noticed that OpenBSD added a free() that we didn't have, so I added that as well.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

feld retitled this revision from to ifconfig(8) unhide groups.
feld updated this object.
feld edited the test plan for this revision. (Show Details)
feld set the repository for this revision to rS FreeBSD src repository - subversion.
feld added subscribers: glebius, des.

Adding @glebius who has touched ifconfig a lot, and @des who was the last to touch ifgroup.c

The patch is about changing default behaviour, so no technical review can be provided. Why the ifgroup behavior was hidden under -v, I have no idea.

des edited edge metadata.

I would also like an ifconfig command-line option to display a list of interface groups, but this alone is a huge step forward. I didn't even know that -v would show which groups an interface belongs to...

This revision is now accepted and ready to land.Nov 18 2014, 4:22 PM

Committed, thanks all.