Removed old API call

Tiny changes to XSS check code
This commit is contained in:
Luca 2015-12-27 19:09:14 +01:00
parent 11f8c934d0
commit 12aad4e7a7
3 changed files with 5 additions and 9 deletions

View file

@ -29,12 +29,9 @@ function fill_ports_array(field_key, flows_stats, host)
end
if (host == nil) then
flows_stats = interface.queryFlowsInfo("SELECT PORTS FROM FLOWS")
flows_stats,total = aggregateFlowsStats(interface.getFlowsInfo())
else
host_table = hostkey2hostinfo(host)
host = host_table["host"]
vlan = host_table["vlan"] or 0
flows_stats = interface.queryFlowsInfo("SELECT PORTS FROM FLOWS WHERE host = "..host.." AND vlan = "..tostring(vlan))
flows_stats,total = aggregateFlowsStats(interface.getFlowsInfo(host))
end
client_ports = fill_ports_array("cli", flows_stats, host)
server_ports = fill_ports_array("srv", flows_stats, host)