Skip to content
Commit 8effea58 authored by Jo-Philipp Wich's avatar Jo-Philipp Wich
Browse files

luci-base: network.js: consider uci config for Device.getType()/getParent()



For network devices declared in uci but not yet created by netifd, the
runtime status information will be unavailable, causing methods such as
`getType()` to assume plain ethernet interfaces and `getParent()` to fail
resolving parent devices.

Fall back to infer the information from uci configuration settings in such
cases to give accurate type hints to callers.

In particular, this prevents LuCI from turning wireless target networks
containing a to-be-created bridge device into bridges themselves.

Fixes: https://github.com/openwrt/packages/issues/18768
Signed-off-by: default avatarJo-Philipp Wich <jo@mein.io>
parent dae17ede
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment