Fixes router mac address name shown to all IPs

This commit is contained in:
Simone Mainardi 2021-01-15 12:54:35 +01:00
parent 9974382758
commit 9f8cfbe1c0
2 changed files with 5 additions and 1 deletions

View file

@ -1460,7 +1460,7 @@ function hostinfo2label(host_info)
-- If local broadcast domain host and DHCP, try to get the label associated
-- to the MAC address
if host_info["mac"] and (host_info["broadcast_domain_host"] ~= false) and (host_info["dhcpHost"] ~= false) then
if host_info["mac"] and (host_info["broadcast_domain_host"] or host_info["dhcpHost"]) then
alt_name = getHostAltName(host_info["mac"])
if not isEmptyString(alt_name) then
@ -1733,6 +1733,8 @@ function flowinfo2hostname(flow_info, host_type, alerts_view)
local hostinfo = {
host = flow_info[host_type..".ip"],
mac = flow_info[host_type..".mac"],
dhcpHost = flow_info[host_type..".dhcpHost"],
broadcast_domain_host = flow_info[host_type..".broadcast_domain_host"],
vlan = flow_info["vlan"],
}