Label fix when mac is missing

This commit is contained in:
Luca Deri 2025-01-03 18:00:26 +01:00
parent 469e1fc69f
commit 8b046d1996

View file

@ -72,15 +72,22 @@ function flowinfo2hostname(flow_info, host_type, alerts_view, add_hostname)
end
end
local hostinfo = {
host = flow_info[host_type .. ".ip"],
label = flow_info[host_type .. ".host"],
mac = flow_info[host_type .. ".mac"],
-- 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"]
}
mac = flow_info[host_type .. ".mac"]
if not isEmptyString(mac) then
hostinfo.mac = mac
end
return (hostinfo2label(hostinfo, true, false, true))
end