gingerbase
gingerbase copied to clipboard
Dummy nics are not detected
trafficstars
Repro: Create a dummy ethernet device
ip link add dummy1 type dummy
ip link
#shows
#xx: dummy1: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN mode DEFAULT
#link/ether a6:c5:7f:bc:31:11 brd ff:ff:ff:ff:ff:ff
Function nics() in netinfo.py returns list(set([b.split('/')[-2] for b in glob.glob(NIC_PATH)]
NIC_PATH is set to /sys/class/net/*/device
/sys/class/net/dummy1/device <-- does not exist, so dummy1 is not detected.
NIC_PATH should be /sys/class/net/* and nics() should be updated IMHO
Unfortunately it's not that simple because /sys/class/net/* does not contain only nics. It contains bridges too.
I'll take a look to see if there's a simple way of allowing the detection of dummy devices (perhaps with ethtool)