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>
This commit is contained in:
parent
21995f0cf3
commit
d4092b15ce
1 changed files with 1 additions and 1 deletions
|
@ -1149,7 +1149,7 @@ Network = baseclass.extend(/** @lends LuCI.network.prototype */ {
|
||||||
if (name == null)
|
if (name == null)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
if (_state.netdevs.hasOwnProperty(name) || isWifiIfname(name))
|
if (_state.netdevs.hasOwnProperty(name))
|
||||||
return this.instantiateDevice(name);
|
return this.instantiateDevice(name);
|
||||||
|
|
||||||
var netid = getWifiNetidBySid(name);
|
var netid = getWifiNetidBySid(name);
|
||||||
|
|
Loading…
Reference in a new issue