luci-base: iface_get_network(): fix condition
authorJo-Philipp Wich <jo@mein.io>
Wed, 4 Mar 2020 07:19:01 +0000 (08:19 +0100)
committerJo-Philipp Wich <jo@mein.io>
Wed, 4 Mar 2020 07:19:01 +0000 (08:19 +0100)
Fixes: #3717
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-base/luasrc/tools/webadmin.lua

index 8801b86fe38c9ad03105401eec761d9ebacf34ee..d1a9050c2e0f545c36186487649b328fc3fde7d7 100644 (file)
@@ -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