From a1ee8e16b66ac9f0c6bf8b7b5f421f79cf1e1587 Mon Sep 17 00:00:00 2001 From: Mathias Kresin Date: Thu, 16 Nov 2017 07:16:59 +0100 Subject: [PATCH] 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 --- modules/luci-mod-admin-full/luasrc/view/admin_network/lease_status.htm | 2 +- modules/luci-mod-admin-full/luasrc/view/admin_status/index.htm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 b4baedff2..7e2cc090e 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 d29a89427..a46ee835c 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)) -- 2.11.0