luci-mod-status: Set status page "Set Static" for MAC to list type
authorPaul Donald <newtwen+github@gmail.com>
Sat, 6 Jul 2024 00:03:49 +0000 (02:03 +0200)
committerPaul Donald <newtwen+github@gmail.com>
Sat, 6 Jul 2024 00:03:49 +0000 (02:03 +0200)
MACs are list type in DHCP; 1 IP can have multiple MACs

Treat IPv6 identically

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/40_dhcp.js

index 19edbd37562241864616231869d0b511da2f5f8b..1cb923755d405fcad20797bbedb4dbf03444db94 100644 (file)
@@ -50,7 +50,7 @@ return baseclass.extend({
 
                uci.set('dhcp', cfg, 'name', lease.hostname);
                uci.set('dhcp', cfg, 'duid', lease.duid.toUpperCase());
-               uci.set('dhcp', cfg, 'mac', lease.macaddr);
+               uci.set('dhcp', cfg, 'mac', [lease.macaddr]);
                if (ip6arr)
                        uci.set('dhcp', cfg, 'hostid', (ip6arr[6] * 0xFFFF + ip6arr[7]).toString(16));