Implements count of aggregated flows in flow aggregation

This commit is contained in:
Simone Mainardi 2018-09-10 16:13:22 +02:00
parent c20e81a08d
commit 0837bf1b20
3 changed files with 16 additions and 1 deletions

View file

@ -414,7 +414,15 @@ void NetworkInterface::aggregatePartialFlow(Flow *flow) {
}
if(aggregatedFlow) {
aggregatedFlow->sumFlowStats(flow);
aggregatedFlow->sumFlowStats(flow,
/* nextFlowAggregation will be decremented by one after the current periodic
flows walk (this method is called in the periodic flows walk)
Therefore, we can check nextFlowAggregation minus one to determine whether
a cleanup of the aggregated flows hash table is going to be performed
after this walk on the (normal, non-aggregated) flows table.
*/
((getIfType() == interface_type_DUMMY) || (nextFlowAggregation - 1 == 0)));
#ifdef AGGREGATED_FLOW_DEBUG
char buf[256];