Various ICMP flow handling improvements

This commit is contained in:
Luca Deri 2022-12-17 21:39:17 +01:00
parent 6bd3b75fc4
commit e190632fd8
7 changed files with 87 additions and 19 deletions

View file

@ -82,8 +82,7 @@ for key, value in ipairs(flows_stats) do
italic = false
elseif(not isEmptyString(flows_info["icmp"])) then
local icmp = flows_info["icmp"]
info = icmp_utils.get_icmp_label(ternary(isIPv4(flows_info["cli.ip"]), 4, 6),
icmp["type"], icmp["code"])
info = icmp_utils.get_icmp_label(icmp["type"], icmp["code"])
elseif(flows_info["proto.ndpi"] == "SIP") then
info = getSIPInfo(flows_info)
elseif(starts(flows_info["proto.ndpi"], "RTP")) then
@ -356,6 +355,10 @@ end
local info = value["info"]
if((info == "") and (value.icmp ~= nil)) then
info = icmp_utils.get_icmp_type(value.icmp.type, true)
end
if isScoreEnabled() then
record["column_score"] = format_utils.formatValue(value.score.flow_score)
end