luci-base: iface_get_network(): fix condition

Fixes: #3717
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
Jo-Philipp Wich 2020-03-04 08:19:01 +01:00
parent e513230622
commit 4fc4c794a0

View file

@ -96,9 +96,7 @@ function iface_get_network(iface)
if net.l3_device == iface or net.device == iface then
-- cross check with uci to filter out @name style aliases
local uciname = cur:get("network", net.interface, "ifname")
if (type(uciname) == "string" and uciname:sub(1,1) ~= "@") or
(type(uciname) == "table")
then
if type(uciname) ~= "string" or uciname:sub(1,1) ~= "@" then
return net.interface
end
end