From 9cc24e6c621b4356627d62aad1eaccad8cf02e2e Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sun, 15 Jul 2018 17:20:27 +0200 Subject: [PATCH] luci-base: fix handling alias interfaces in ifacelist widget Signed-off-by: Jo-Philipp Wich --- .../luasrc/view/cbi/network_ifacelist.htm | 14 ++++++++++---- 1 file 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 @@ -->