HomeFreeBSD

netstat: increase width of Netif column

Description

netstat: increase width of Netif column

The previous width of Netif (10 or 8) was too short for modern interface
names; make it 12, which is long enough to display "epair0a.1000".

This came up in practice with genet(4) interfaces, since the base
interface name is long enough that with the previous limit, VLAN
identifiers would be truncated at 1 character in the IPv6 output:
"genet0.100" becomes "genet0.1".

The width is now fixed, and doesn't depend on the address family,
because there's no reason that length of the interface name would vary
based on the AF.

PR: 266474
Reviewed by: imp,zlei,Mina Galić
Pull Request: https://github.com/freebsd/freebsd-src/pull/1223

(cherry picked from commit d33b87e8cf91a6bcb5eac0ecc0371c1041c61050)

netstat: for -W, use IFNAMSIZ

If -W is specified, use IFNAMSIZ as the width of the Netif column,
instead of the default 12.

(cherry picked from commit ae9c0ba8ef2f540f9030909cf07e3c59f876fd23)
(cherry picked from commit 6b86b8f0f6b6bfd5d93e45c7f584ec5bffac2a62)

Details

Provenance
lexi_le-fay.orgAuthored on May 8 2024, 9:44 AM
zleiCommitted on Oct 10 2024, 10:00 AM
Parents
rGea980c17f48e: if_clone: correctly destroy a clone from a different vnet
Branches
Unknown
Tags
Unknown