From: Mathias Kresin Date: Thu, 16 Nov 2017 07:22:14 +0000 (+0100) Subject: luci-mod-admin-full: indicate DHCPv6 hostname mismatch X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fluci.git;a=commitdiff_plain;h=0a2c7b9e5c1745e28451825c838fc38752bebf60 luci-mod-admin-full: indicate DHCPv6 hostname mismatch In case the DUID can be mapped to the MAC-Address of an already known host, show the already know hostname next to the DHCPv6 supplied one in case they differ. Signed-off-by: Mathias Kresin --- diff --git a/modules/luci-mod-admin-full/luasrc/view/admin_network/lease_status.htm b/modules/luci-mod-admin-full/luasrc/view/admin_network/lease_status.htm index 1f50db5b9..ea6ee91c7 100644 --- a/modules/luci-mod-admin-full/luasrc/view/admin_network/lease_status.htm +++ b/modules/luci-mod-admin-full/luasrc/view/admin_network/lease_status.htm @@ -84,7 +84,10 @@ ? '
? (%h)
'.format(host.name || host.ipv4 || host.ipv6) : '?'; else - tr.insertCell(-1).innerHTML = st[1][i].hostname; + tr.insertCell(-1).innerHTML = + (host && host.name && st[1][i].hostname != host.name) + ? '
%h (%h)
'.format(st[1][i].hostname, host.name) + : st[1][i].hostname; tr.insertCell(-1).innerHTML = st[1][i].ip6addr; tr.insertCell(-1).innerHTML = st[1][i].duid; diff --git a/modules/luci-mod-admin-full/luasrc/view/admin_status/index.htm b/modules/luci-mod-admin-full/luasrc/view/admin_status/index.htm index 626532e1b..9f44ac76d 100644 --- a/modules/luci-mod-admin-full/luasrc/view/admin_status/index.htm +++ b/modules/luci-mod-admin-full/luasrc/view/admin_status/index.htm @@ -423,7 +423,10 @@ ? '
? (%h)
'.format(host.name || host.ipv4 || host.ipv6) : '?'; else - tr.insertCell(-1).innerHTML = info.leases6[i].hostname; + tr.insertCell(-1).innerHTML = + (host && host.name && info.leases6[i].hostname != host.name) + ? '
%h (%h)
'.format(info.leases6[i].hostname, host.name) + : info.leases6[i].hostname; tr.insertCell(-1).innerHTML = info.leases6[i].ip6addr; tr.insertCell(-1).innerHTML = info.leases6[i].duid;