mirror of
https://github.com/openwrt/luci.git
synced 2025-12-21 19:14:34 +04:00
luci-mod-status: optional MAC for static lease
Note that we might not have a MAC address to set in case of a DHCPv6 lease when the DUID is of a type which isn't MAC-based. Signed-off-by: David Härdeman <david@hardeman.nu>
This commit is contained in:
committed by
Paul Donald
parent
a345e036c1
commit
4a651d591b
@@ -69,7 +69,8 @@ return baseclass.extend({
|
||||
|
||||
uci.set('dhcp', cfg, 'name', lease.hostname);
|
||||
uci.set('dhcp', cfg, 'duid', [duid_iaid]);
|
||||
uci.set('dhcp', cfg, 'mac', [lease.macaddr]);
|
||||
if (lease.macaddr)
|
||||
uci.set('dhcp', cfg, 'mac', [lease.macaddr.toUpperCase()]);
|
||||
if (ip6arr)
|
||||
uci.set('dhcp', cfg, 'hostid', (ip6arr[6] * 0xFFFF + ip6arr[7]).toString(16));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user