projects
/
project
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
41e2258
)
luci-base: iface_get_network(): fix condition
author
Jo-Philipp Wich
<jo@mein.io>
Tue, 3 Mar 2020 19:36:54 +0000
(20:36 +0100)
committer
Jo-Philipp Wich
<jo@mein.io>
Tue, 3 Mar 2020 19:36:54 +0000
(20:36 +0100)
Fixes: #3715
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-base/luasrc/tools/webadmin.lua
patch
|
blob
|
history
diff --git
a/modules/luci-base/luasrc/tools/webadmin.lua
b/modules/luci-base/luasrc/tools/webadmin.lua
index 106810aa03e44e6ac1fa22dd0af436d4b821fbeb..8801b86fe38c9ad03105401eec761d9ebacf34ee 100644
(file)
--- 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