Add client-server-srv_port aggregation criteria. (#7643) (#7652)

This commit is contained in:
Nicolò Maio 2023-07-11 17:25:33 +02:00 committed by GitHub
parent 7d727b3c16
commit 330d66123d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 70 additions and 17 deletions

View file

@ -104,6 +104,7 @@ for _, data in pairs(aggregated_info or {}) do
local server = nil
local info = nil
local application = nil
local srv_port = nil
if (vlan) and
(tonumber(vlan) ~= tonumber(data.vlan_id) or tonumber(vlan) ~= tonumber(data.cli_vlan_id) or tonumber(vlan) ~=
@ -143,6 +144,13 @@ for _, data in pairs(aggregated_info or {}) do
}
end
if (response ~= {} and response.add_srv_port) then
srv_port = {
label = data.srv_port,
id = data.srv_port
}
end
-- Format the client and server info
if (add_client or (response ~= {} and response.add_client)) then
local host = interface.getHostInfo(data.client_ip, data.cli_vlan_id or data.vlan_id)
@ -206,6 +214,7 @@ for _, data in pairs(aggregated_info or {}) do
client = client,
server = server,
info = info,
srv_port = srv_port,
application = application,
vlan_id = {
id = nil,