mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-28 23:19:33 +00:00
Improved hostname resolution
This commit is contained in:
parent
cdb26c89ec
commit
50c41ceeef
3 changed files with 18 additions and 12 deletions
|
|
@ -109,7 +109,7 @@ local function hostinfo2label_resolved(host_info, show_vlan, shorten_len, skip_r
|
|||
-- Try and get the resolved name
|
||||
res = ntop.getResolvedName(ip)
|
||||
|
||||
if not isEmptyString(res) then
|
||||
if((not isEmptyString(res)) and (res ~= ip)) then
|
||||
res = string.lower(res)
|
||||
|
||||
if(host_info.names == nil) then
|
||||
|
|
@ -117,6 +117,8 @@ local function hostinfo2label_resolved(host_info, show_vlan, shorten_len, skip_r
|
|||
end
|
||||
|
||||
host_info.names["DNS (Cache) Resolution"] = res
|
||||
interface.setHostResolvedName(ip, res);
|
||||
-- tprint(ip .. " = " .. res)
|
||||
else
|
||||
-- Nothing found, just fallback to the IP address
|
||||
res = ip
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue