mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-20 09:03:24 +00:00
Added fix for flow filtering
This commit is contained in:
parent
75a4a11eef
commit
cd735029d1
1 changed files with 5 additions and 1 deletions
|
|
@ -52,7 +52,11 @@ else
|
|||
if(#flow_key_and_hash == 2) then
|
||||
local flow = interface.findFlowByKeyAndHashId(tonumber(flow_key_and_hash[1]), tonumber(flow_key_and_hash[2]))
|
||||
|
||||
if flow then
|
||||
if((flow ~= nil)
|
||||
and ((flows_filter.deviceIpFilter == nil) or (flows_filter.deviceIpFilter == flow["device_ip"]))
|
||||
and ((flows_filter.inIndexFilter == nil) or (flows_filter.inIndexFilter == flow["in_index"]) )
|
||||
and ((flows_filter.outIndexFilter == nil) or (flows_filter.outIndexFilter == flow["out_index"]))
|
||||
) then
|
||||
flows_stats[#flows_stats + 1] = flow
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue