From: Mathias Kresin Date: Thu, 16 Nov 2017 06:16:59 +0000 (+0100) Subject: luci-mod-admin-full: don't replace DHCPv6 hostname X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=a1ee8e16b66ac9f0c6bf8b7b5f421f79cf1e1587;p=project%2Fluci.git luci-mod-admin-full: don't replace DHCPv6 hostname Don't replace the DHCPv6 supplied hostname if the DUID can be mapped to the MAC-Address of an already known host. It hides the issue of a missing DHCPv6 hostname and could lead to the conclution that the already known host has an IPv6 address. 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 b4baedff28..7e2cc090e4 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 @@ -78,7 +78,7 @@ tr.className = 'cbi-section-table-row cbi-rowstyle-' + ((i % 2) + 1); var host = hosts[duid2mac(st[1][i].duid)]; - if (host) + if (!st[1][i].hostname && host) tr.insertCell(-1).innerHTML = String.format( '
%s
', ((host.name && (host.ipv4 || host.ipv6)) 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 d29a894276..a46ee835c3 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 @@ -417,7 +417,7 @@ tr.className = 'cbi-section-table-row cbi-rowstyle-' + ((i % 2) + 1); var host = hosts[duid2mac(info.leases6[i].duid)]; - if (host) + if (!info.leases6[i].hostname && host) tr.insertCell(-1).innerHTML = String.format( '
%s
', ((host.name && (host.ipv4 || host.ipv6))