From: Jo-Philipp Wich Date: Thu, 21 Jul 2011 15:26:55 +0000 (+0000) Subject: applications/luci-wol: cope with host entries that have multiple MACs assigned X-Git-Tag: 0.11.0~1908 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=224dc2daa2038f35beec665bf687ec0fa9544d29;p=oweals%2Fluci.git applications/luci-wol: cope with host entries that have multiple MACs assigned --- diff --git a/applications/luci-wol/luasrc/model/cbi/wol.lua b/applications/luci-wol/luasrc/model/cbi/wol.lua index 30467f430..ad3479bca 100644 --- a/applications/luci-wol/luasrc/model/cbi/wol.lua +++ b/applications/luci-wol/luasrc/model/cbi/wol.lua @@ -72,7 +72,14 @@ end uci:foreach("dhcp", "host", function(s) if s.mac and s.ip then - arp[s.mac:upper()] = { s.ip, s.name } + if type(s.mac) == "table" then + local m + for _, m in ipairs(s.mac) do + arp[m:upper()] = { s.ip, s.name } + end + else + arp[s.mac:upper()] = { s.ip, s.name } + end end end)