ifconfig gets incorrect interface list from SIOCGIFCONF or uses it incorrectly
|Reported by:||mmu_man||Owned by:||axeld|
|Component:||Network & Internet/Stack||Version:|
There seems to be an off-by-1 error somewhere in either ifconfig or handling of SIOCGIFCONF by datalink, as the 3rd interface here is listed as "dev/net/tulip/0", without the first slash. (I have 2 cards in that box, the sis900 which fried from a storm, and a tulip for which I've put a tulip binary driver from zeta). Using the NIC name as argument to ifconfig works as expected though, the card does work, just getting the list is broken. I'll have a look at that today.
~>ifconfig loop Hardware Type: Local Loopback, Address: none
inet addr: 127.0.0.1, Mask: 255.0.0.0 MTU: 16384, Metric: 0, up loopback Receive: 0 packets, 0 errors, 0 bytes, 0 mcasts, 0 dropped Transmit: 0 packets, 0 errors, 0 bytes, 0 mcasts, 0 dropped Collisions: 0
Hardware Type: Ethernet, Address: 00:0b:6a:6f:9f:61 inet addr: MTU: 1500, Metric: 0, up broadcast Receive: 0 packets, 0 errors, 0 bytes, 0 mcasts, 0 dropped Transmit: 0 packets, 0 errors, 0 bytes, 0 mcasts, 0 dropped Collisions: 0
ifconfig: Interface "dev/net/tulip/0" does not exist.