Improved host label format: mac is hidden when IP address is present

This commit is contained in:
Luca 2025-01-15 18:21:37 +01:00
parent c7dde58970
commit a9af013ee8

View file

@ -72,7 +72,6 @@ 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"],
@ -84,7 +83,7 @@ function flowinfo2hostname(flow_info, host_type, alerts_view, add_hostname)
mac = flow_info[host_type .. ".mac"]
if not isEmptyString(mac) then
if((hostinfo.host == nil) and (not isEmptyString(mac))) then
hostinfo.mac = mac
end