Getting interface device on current and older version of OpenWrt

Will the code below work on older and current versions of OpenWrt to obtain the interface device name?

dev="$(uci -q get "network.${iface}.device")$(uci -q get "network.${iface}.dev")"

Were there the transition states (or some type of interfaces) where both dev and device options would be set for the interface?

Use network_get_device from /lib/functions/

Many interface protocols do not encode the effective layer 3 device directly in the configuration.


This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.