diff options
author | Jo-Philipp Wich <jo@mein.io> | 2019-11-13 18:30:22 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2019-11-13 18:36:15 +0100 |
commit | 304dd37e3fb44843466c38b883fa91b463b5cd1c (patch) | |
tree | e2cb1e88cbd8653a49f7fc604513c05b28a4dc15 | |
parent | 2e8aa301aa2a1aa07438de8dd962c21f0c8559f2 (diff) |
luci-base: network.js: fix getDevices()
- Don't filter virtual interfaces
- Skip duplicate wireless devices
Fixes: #3304
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
-rw-r--r-- | modules/luci-base/htdocs/luci-static/resources/network.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/network.js b/modules/luci-base/htdocs/luci-static/resources/network.js index 3cc51ed40a..504f592978 100644 --- a/modules/luci-base/htdocs/luci-static/resources/network.js +++ b/modules/luci-base/htdocs/luci-static/resources/network.js @@ -385,6 +385,7 @@ function initNetworkState(refresh) { type: dev.type, mtu: dev.mtu, qlen: dev.qlen, + wireless: dev.wireless, ipaddrs: [], ip6addrs: [] }; @@ -1148,7 +1149,10 @@ Network = L.Class.extend(/** @lends LuCI.Network.prototype */ { if (devices.hasOwnProperty(ifname)) continue; - if (isIgnoredIfname(ifname) || isVirtualIfname(ifname) || isWifiIfname(ifname)) + if (isIgnoredIfname(ifname) || isWifiIfname(ifname)) + continue; + + if (_state.netdevs[ifname].wireless) continue; devices[ifname] = this.instantiateDevice(ifname); |