Fix string to numeric IP conversion in flow alerts

This commit is contained in:
Alfredo Cardigliano 2022-05-11 15:46:39 +02:00
parent 7e9b3579c5
commit 7025b3dd5b
2 changed files with 10 additions and 7 deletions

View file

@ -23,8 +23,11 @@ function historical_flow_utils.fixWhereTypes(query)
local flow_columns = historical_flow_utils.get_flow_columns()
for column, info in pairs(flow_columns) do
if info.where_func then
result = result:gsub(column .. "=", column .. "=" .. info.where_func)
result = result:gsub(column .. "!=", column .. "!=" .. info.where_func)
result = result:gsub(column .. "=" , column .. "=" .. info.where_func)
result = result:gsub(column .. " = ", column .. " = " .. info.where_func)
result = result:gsub(column .. "!=" , column .. "!=" .. info.where_func)
result = result:gsub(column .. " != ", column .. " != " .. info.where_func)
end
end