From 304dd37e3fb44843466c38b883fa91b463b5cd1c Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Wed, 13 Nov 2019 18:30:22 +0100 Subject: luci-base: network.js: fix getDevices() - Don't filter virtual interfaces - Skip duplicate wireless devices Fixes: #3304 Signed-off-by: Jo-Philipp Wich --- modules/luci-base/htdocs/luci-static/resources/network.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'modules/luci-base/htdocs/luci-static/resources') 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); -- cgit v1.2.3