From ffff1e7c0aa58991ffae5216221b8bb205f8bc78 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 abfa33e1ed..a97e9ef6d0 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 @@ -->