Netstat -i 5-character interface name length?

From: Chris Ross <cross+freebsd_at_distal.com>
Date: Wed, 29 Jun 2022 14:56:41 UTC
Hello folks.  I just noticed something that I’m sure has been true forever, but I checked and it’s still true on my 12.3-STABLE system.

In the daily run output, I’m seeing the network interface names truncated.  This comes from netstat -I apparently only rendering the first 5 characters of the interface name.  Many of my systems have `vlanNN` interfaces, but they show up as `vlanN` in netstat output.  Unfortautnely, I have all of vlan1, vlan3, vlan11, and vlan33 on one of my systems (plus others).  This makes it impossible to identify which of the lines of output are which interface:

vlan0  1500 <Link#7>      90:e2:ba: dd:ee:ff 7898136066     0     0 6455161338     0     0     0 
vlan0     - A.B.C.D/ pool-A.B.C.D 1172409474     -     - 780810867     -     -     - 
vlan1  1500 <Link#8>      90:e2:ba:dd:ee:ff 4317051938     0     0 4879301946     0     0     0 
vlan1     - fe80::%vlan1/ fe80::92e2:baff:f   702196     -     -  4498316     -     -     - 
vlan1     - 2001:470:e24c hostname           5966892     -     -  9302547     -     -     - 
vlan3  1500 <Link#9>      90:e2:ba:dd:ee:ff 230398636     0     0 317573885     0     0     0 
vlan3     - fe80::%vlan3/ fe80::92e2:baff:f   399612     -     -  4042723     -     -     - 
vlan3     - 2001:470:e24c 2001:470:e24c:66   523819     -     -  7747524     -     -     - 
[…]
vlan1  1500 <Link#13>     90:e2:ba:dd:ee:ff 220678168     0     0 525414925     0     0     0 
vlan1     - 192.168.11.0 hostname           2931863     -     -  6448727     -     -     - 
vlan1     - fe80::%vlan11 fe80::92e2:baff:f   518679     -     -  4145688     -     -     - 
vlan1     - 2001:470:e24c 2001:470:e24c:11   614377     -     -  7638691     -     -     - 
vlan3  1500 <Link#14>     90:e2:ba:dd:ee:ff   179779     0     0   173578     0     0     0 
vlan3     - 192.168.33.0/ hostname             12888     -     -    12311     -     -     - 
vlan3     - fe80::%vlan33 fe80::92e2:baff:f      939     -     -    26025     -     -     - 
vlan3     - 2001:470:e24c 2001:470:e24c:33:     2227     -     -     2915     -     -     - 

Can someone check if this is still so in 13 or CURRENT, and/or let me know if I’m doing something wrong?

             - Chris