[PATCH] netifd: system-linux: add dev_type info for ubus network.device status
Philip Prindeville
philipp_subx at redfish-solutions.com
Tue Jan 11 10:51:44 PST 2022
> On Dec 7, 2021, at 5:26 AM, Jo-Philipp Wich <jo at mein.io> wrote:
>
> Hi,
>
>> I have now taken a look at your suggestion.
>> Unfortunately, I found that not all network interfaces have set the DEVTYPE
>> attribute set in their uevent file. I have not yet found any information
>> who sets this value. Does this do the driver or the subsystem?
>
> afair it is set by the responsible driver.
>
>> [...]
>> The question now if this DEVTYPE is not set what should we do?
>
> I think in case of an absent DEVTYPE variable you can assume "ethernet" as
> fallback (cross check with /sys/class/net/*/type == 1).
What do IP-level devices (like GRE or IP-over-IP) tunnels do?
-Philip
>
> Another approach would be falling back to your original mapping in case
> DEVTYPE is not present (so 1->ethernet, 24->ppp, etc.)
>
>
> ~ Jo
More information about the openwrt-devel
mailing list