I'm not at all familiar with the net-tools source, but here's a quick
proof-of-concept patch to pull the list of interface names out of
/proc/net/dev (silently skipping any that don't support the SIOCGMIIPHY
ioctl [lo, lxcbr0, etc.]).

===== first example =====
./mii-tool_lp962616 
enp4s0: negotiated 100baseTx-FD, link ok
enp9s0: no link
enp8s0: negotiated 1000baseT-FD flow-control, link ok
enp6s0: negotiated 1000baseT-FD flow-control, link ok

===== second example =====
./mii-tool_lp962616 
eno1: negotiated 1000baseT-FD flow-control, link ok
SIOCGMIIPHY on 'eno2' failed: Resource temporarily unavailable


(Obviously one downside of /proc/net/dev is that it isn't always in 
alphabetical order...)

** Patch added: "mii-tool interface-name searching"
   
https://bugs.launchpad.net/ubuntu/+source/net-tools/+bug/962616/+attachment/4696078/+files/mii-tool.c_lp962616.patch

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to net-tools in Ubuntu.
https://bugs.launchpad.net/bugs/962616

Title:
  mii-tool assumes NIC names of the form eth* when given no interface(s)
  as argument

Status in net-tools package in Ubuntu:
  Confirmed

Bug description:
  On a system with biosdevname enabled, which names NICs in the forms
  em* and p*p*, mii-tool will return the message "no MII interfaces
  found" if mii-tool is called without specifying an interface. The
  correct behavior would be to iterate through em* and p*p*. (More
  information on biosdevname can be found at
  
http://linux.dell.com/files/whitepapers/consistent_network_device_naming_in_linux.pdf.)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/net-tools/+bug/962616/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to