Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/openwrt/luci.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2021-11-10 13:51:42 +0300
committerJo-Philipp Wich <jo@mein.io>2021-11-10 13:57:43 +0300
commitd4092b15ce92cda2d7711b57b2251ebebef32b5c (patch)
treed6019e56779faa10cdb0ece9edcec767ff95c130
parent21995f0cf3f53cde6cafc5b9e547fbdce9daf057 (diff)
luci-base: network.js: ignore wireless ifname patterns on retrieving devices
Only treat the given identifier as Linux netdev name if we can find a corresponding entry in the device info cache and do not consider strings starting with "wlan", "ath" or "wl" to be existing devices. This fixes incorrectly adding wireless sections as ifnames to network interfaces when the wifi-iface section name begins with one of the `iface_patterns_wireless` patterns. Fixes: #5069 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
-rw-r--r--modules/luci-base/htdocs/luci-static/resources/network.js2
1 files changed, 1 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 2a402bcd57..8c9ee255ff 100644
--- a/modules/luci-base/htdocs/luci-static/resources/network.js
+++ b/modules/luci-base/htdocs/luci-static/resources/network.js
@@ -1149,7 +1149,7 @@ Network = baseclass.extend(/** @lends LuCI.network.prototype */ {
if (name == null)
return null;
- if (_state.netdevs.hasOwnProperty(name) || isWifiIfname(name))
+ if (_state.netdevs.hasOwnProperty(name))
return this.instantiateDevice(name);
var netid = getWifiNetidBySid(name);