From: Jo-Philipp Wich Date: Tue, 3 Mar 2020 19:36:54 +0000 (+0100) Subject: luci-base: iface_get_network(): fix condition X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=e51323062251b1a523cfdcbc1d30af611f3cfdb4;p=oweals%2Fluci.git luci-base: iface_get_network(): fix condition Fixes: #3715 Signed-off-by: Jo-Philipp Wich --- diff --git a/modules/luci-base/luasrc/tools/webadmin.lua b/modules/luci-base/luasrc/tools/webadmin.lua index 106810aa0..8801b86fe 100644 --- a/modules/luci-base/luasrc/tools/webadmin.lua +++ b/modules/luci-base/luasrc/tools/webadmin.lua @@ -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