netdev
netdev copied to clipboard
WWAN device reported as ethernet
Issue Description
In some cases, wireless (Wi-Fi & WWAN) devices report their type as "Ethernet" (/sys/class/net/
It's unclear whether this issue is related to the kernel or driver (but a workaround is required as the app may be run on a distro with this problem).
Observations
The following list I got:
Interface: "enp2s0", type: Ethernet, up: true # real ethernet
Interface: "wlp3s0", type: Ethernet, up: true # wiifi card
Interface: "wlp108s0", type: Ethernet, up: true # wifi card
Interface: "wwp0s20f0u2i12", type: Ethernet, up: true # wwan card
Differences observed:
- For Wi-Fi cards, there is a "wireless" directory under
/sys/class/net/<interface>/. - For WWAN cards, there is no "wireless" directory, but
/sys/class/net/<interface>/flagscontains NO_ARP.
Request for Help
If anyone has insights or can identify other differences by which devices can be distinct, your input would be greatly appreciated.
Thank you for your report. I will investigate the differences in the device filesystem specifications and revise the implementation to accurately identify device types. Until now, I have conducted tests on Ubuntu and Kali Linux, but I plan to also examine the behavior on Arch Linux. This will help us understand the differences in behavior across various Linux distributions and enable us to devise more appropriate measures.
I will continue to consider specific workarounds and solutions based on the results of these tests.
Fixed detection for Wi-Fi devices on Linux, ensuring they are correctly identified when previously they might have been misclassified as Ethernet. This was achieved by checking additional directories like /sys/class/net/<interface>/wireless and /sys/class/net/<interface>/phy80211 whenever the /sys/class/net/<interface>/type returned 1 (Ethernet).
Tested on Ubuntu, Kali, and Arch.
However, the current implementation does not yet cover WWAN devices. We are considering keeping this issue open to address WWAN coverage specifically, or we might close this issue and open a new one focused solely on WWAN detection improvements.