summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2018-07-15 17:20:27 +0200
committerJo-Philipp Wich <jo@mein.io>2018-07-15 17:28:38 +0200
commitffff1e7c0aa58991ffae5216221b8bb205f8bc78 (patch)
tree68624e33744db37e130245bbabd53ae0e98fc028 /modules/luci-base
parent37aeb77ddaa2e4bbbc4eaa099a4e6219f50be7bf (diff)
luci-base: fix handling alias interfaces in ifacelist widget
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules/luci-base')
-rw-r--r--modules/luci-base/luasrc/view/cbi/network_ifacelist.htm14
1 files changed, 10 insertions, 4 deletions
diff --git a/modules/luci-base/luasrc/view/cbi/network_ifacelist.htm b/modules/luci-base/luasrc/view/cbi/network_ifacelist.htm
index abfa33e1e..a97e9ef6d 100644
--- a/modules/luci-base/luasrc/view/cbi/network_ifacelist.htm
+++ b/modules/luci-base/luasrc/view/cbi/network_ifacelist.htm
@@ -26,9 +26,14 @@
else
local n = self.network and net:get_network(self.network)
if n then
- local i
- for _, i in ipairs(n:get_interfaces() or { n:get_interface() }) do
- checked[i:name()] = true
+ local a = n:is_alias()
+ if a then
+ checked['@' .. a] = true
+ else
+ local i
+ for _, i in ipairs(n:get_interfaces() or { n:get_interface() }) do
+ checked[i:name()] = true
+ end
end
end
end
@@ -50,7 +55,8 @@
--></script>
<ul>
<% for _, iface in ipairs(ifaces) do
- if (not self.nobridges or not iface:is_bridge()) and
+ if (not self.noaliases or iface:type() ~= "alias") and
+ (not self.nobridges or not iface:is_bridge()) and
(not self.noinactive or iface:is_up()) and
iface:name() ~= self.exclude
then %>