From e51323062251b1a523cfdcbc1d30af611f3cfdb4 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Tue, 3 Mar 2020 20:36:54 +0100 Subject: [PATCH] luci-base: iface_get_network(): fix condition Fixes: #3715 Signed-off-by: Jo-Philipp Wich --- modules/luci-base/luasrc/tools/webadmin.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- 2.25.1