From: Jo-Philipp Wich Date: Wed, 4 Mar 2020 07:19:01 +0000 (+0100) Subject: luci-base: iface_get_network(): fix condition X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=4fc4c794a09d18ada49c5dd2560c2907971801c4;p=oweals%2Fluci.git luci-base: iface_get_network(): fix condition Fixes: #3717 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 8801b86fe..d1a9050c2 100644 --- a/modules/luci-base/luasrc/tools/webadmin.lua +++ b/modules/luci-base/luasrc/tools/webadmin.lua @@ -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