mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-28 23:19:33 +00:00
parent
0e7eddf02e
commit
2f4c89f6a6
1 changed files with 6 additions and 1 deletions
|
|
@ -1725,7 +1725,8 @@ function getDeviceName(device_mac, skip_manufacturer)
|
|||
|
||||
if (info ~= nil) then
|
||||
for x, host in pairs(info.hosts) do
|
||||
if not isEmptyString(host.name) and host.name ~= host.ip and host.name ~= "NoIP" then
|
||||
-- Make sure the IP is in the broadcast domain to avoid setting up names to MACs such as the gateway
|
||||
if host.broadcast_domain_host and not isEmptyString(host.name) and host.name ~= host.ip and host.name ~= "NoIP" then
|
||||
name = host.name
|
||||
elseif host.ip ~= "0.0.0.0" then
|
||||
name = ip2label(host.ip)
|
||||
|
|
@ -1749,6 +1750,10 @@ function getDeviceName(device_mac, skip_manufacturer)
|
|||
end
|
||||
end
|
||||
|
||||
if isEmptyString(name) or name == device_mac then
|
||||
return ''
|
||||
end
|
||||
|
||||
return name
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue