luci-base: iface_get_network(): fix condition

Fixes: #3715
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
Jo-Philipp Wich 2020-03-03 20:36:54 +01:00
parent 41e2258d6d
commit e513230622

View file

@ -96,7 +96,9 @@ 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 uciname then
if (type(uciname) == "string" and uciname:sub(1,1) ~= "@") or
(type(uciname) == "table")
then
return net.interface
end
end