From 4fc4c794a09d18ada49c5dd2560c2907971801c4 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Wed, 4 Mar 2020 08:19:01 +0100 Subject: [PATCH] luci-base: iface_get_network(): fix condition Fixes: #3717 Signed-off-by: Jo-Philipp Wich --- modules/luci-base/luasrc/tools/webadmin.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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 -- 2.25.1