luci-base: network.js: ignore wireless ifname patterns on retrieving devices
authorJo-Philipp Wich <jo@mein.io>
Wed, 10 Nov 2021 10:51:42 +0000 (11:51 +0100)
committerJo-Philipp Wich <jo@mein.io>
Wed, 10 Nov 2021 10:57:59 +0000 (11:57 +0100)
commite1ccb6621c597c01ba4ab2187ffb49ed156566a0
treecafaaa08d3d08be66ad2e2e195a101c428486fbf
parent47026f54caf3ae3b3f74a95d799b1e9c79ff2c45
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>
(cherry picked from commit d4092b15ce92cda2d7711b57b2251ebebef32b5c)
modules/luci-base/htdocs/luci-static/resources/network.js