From: Jo-Philipp Wich Date: Wed, 13 Nov 2019 17:30:22 +0000 (+0100) Subject: luci-base: network.js: fix getDevices() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=ebd354d4205bada31c7c4c6a3ccf801ea30dfeae;p=project%2Fluci.git luci-base: network.js: fix getDevices() - Don't filter virtual interfaces - Skip duplicate wireless devices Fixes: #3304 Signed-off-by: Jo-Philipp Wich (cherry picked from commit 304dd37e3fb44843466c38b883fa91b463b5cd1c) --- 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);