Opened 9 years ago

Last modified 9 years ago

#9393 new bug

NetworkInterfaces don't identify themselves properly while disabled

Reported by: kallisti5 Owned by: axeld
Priority: normal Milestone: Unscheduled
Component: Network & Internet/Stack Version: R1/Development
Keywords: IsWireless IsEthernet BNetworkDevice Cc:
Blocked By: Blocking:
Platform: All


kits/network/libnetapi/NetworkDevice.cpp:BNetworkDevice::IsEthernet() kits/network/libnetapi/NetworkDevice.cpp:BNetworkDevice::IsWireless()

While an interface is disabled, both IsEthernet and IsWireless return false making identification of network devices difficult while they are disabled.

IsWireless checks for a media type of "IFM_IEEE80211" IsEthernet checks for a media type of "IFM_ETHER"

As far as I can tell, these are both set properly at the freebsd glue layer. My guess is that this failure might be comming from the "do_request(request, Name(), SIOCGIFMEDIA) != B_OK" check in BNetworkDevice::Media.

Maybe we should be identifying these devices using some other metric?

Change History (1)

comment:1 by phoudoin, 9 years ago

Or the stack's ioctl() should not reject SIOCGIFMEDIA because the interface is disabled. It's not like an interface's media will change next time it's enabled...

Others SIOCGIF* may also be happy to respond even when itf is disabled. I didn't check which ones, though.

Note: See TracTickets for help on using tickets.