Fixed error when MAC address are null (for instance with flows)

This commit is contained in:
Luca Deri 2022-12-13 21:22:43 +01:00
parent af27e50699
commit 482a69a3d6

View file

@ -607,7 +607,14 @@ local function formatFlowHost(flow, cli_or_srv, historical_bounds, hyperlink_suf
host_name = host_name .. format_utils.formatFullAddressCategory(host)
return hostinfo2detailshref(flow2hostinfo(flow, cli_or_srv), hyperlink_params, host_name, nil, true --[[ perform link existance checks --]]), host["mac"]
local mac
if(host == nil) then
mac = nil
else
mac = host["mac"]
end
return hostinfo2detailshref(flow2hostinfo(flow, cli_or_srv), hyperlink_params, host_name, nil, true --[[ perform link existance checks --]]), mac
end
local function formatFlowPort(flow, cli_or_srv, port, historical_bounds)