From 8bd4e78ff27c3e516b197f6b7500367d6672d68b Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Wed, 10 Nov 2021 11:51:42 +0100 Subject: [PATCH] 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 (cherry picked from commit d4092b15ce92cda2d7711b57b2251ebebef32b5c) --- modules/luci-base/htdocs/luci-static/resources/network.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/luci-base/htdocs/luci-static/resources/network.js b/modules/luci-base/htdocs/luci-static/resources/network.js index 80d413e4d4..725b90dfb6 100644 --- a/modules/luci-base/htdocs/luci-static/resources/network.js +++ b/modules/luci-base/htdocs/luci-static/resources/network.js @@ -1117,7 +1117,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); -- 2.30.2