luci-base: iface_get_network(): fix condition
Fixes: #3715 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
41e2258d6d
commit
e513230622
1 changed files with 3 additions and 1 deletions
|
@ -96,7 +96,9 @@ function iface_get_network(iface)
|
||||||
if net.l3_device == iface or net.device == iface then
|
if net.l3_device == iface or net.device == iface then
|
||||||
-- cross check with uci to filter out @name style aliases
|
-- cross check with uci to filter out @name style aliases
|
||||||
local uciname = cur:get("network", net.interface, "ifname")
|
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
|
return net.interface
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue