From: Jo-Philipp Wich Date: Sun, 15 Jul 2018 15:20:27 +0000 (+0200) Subject: luci-base: fix handling alias interfaces in ifacelist widget X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=9cc24e6c621b4356627d62aad1eaccad8cf02e2e;p=oweals%2Fluci.git luci-base: fix handling alias interfaces in ifacelist widget Signed-off-by: Jo-Philipp Wich --- 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 @@ -->