Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions biflow_aggregator/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ do_mainloop(Configuration& config)
while (unlikely(stop == false)) {

// Check timeouted flows
for (node<agg::Timeout_data> *t_data = dll.begin(); t_data != NULL; t_data = t_data->next) {
for (node<agg::Timeout_data> *t_data = dll.begin(); !flush_configuration.is_set() && t_data != NULL; t_data = t_data->next) {
if (time_last >= t_data->value.passive_timeout) { // timeouted
auto data = agg.flow_cache.find(t_data->value.key);
proccess_and_send(agg, data->first, data->second, out_tmplt, out_rec);
Expand Down Expand Up @@ -486,7 +486,7 @@ do_mainloop(Configuration& config)
time_last = ur_time_get_sec(ur_get(in_tmplt, in_data, F_TIME_LAST));

// Check timeouted flows
for (node<agg::Timeout_data> *t_data = dll.begin(); t_data != NULL; t_data = t_data->next) {
for (node<agg::Timeout_data> *t_data = dll.begin(); !flush_configuration.is_set() && t_data != NULL; t_data = t_data->next) {
if (time_first >= t_data->value.passive_timeout || time_last >= t_data->value.active_timeout) { // timeouted
auto data = agg.flow_cache.find(t_data->value.key);
proccess_and_send(agg, data->first, data->second, out_tmplt, out_rec);
Expand Down
2 changes: 1 addition & 1 deletion biflow_aggregator/tests/inputs/input2_packet_aggregation
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ ipaddr DST_IP,ipaddr SRC_IP,uint32 PACKETS,time TIME_FIRST,time TIME_LAST
192.168.1.5,192.168.1.6,666,2016-10-28T17:00:3.0,2016-10-28T17:00:11.0
192.168.1.8,192.168.1.9,10,2016-10-28T17:00:13.0,2016-10-28T17:00:17.0
192.168.1.8,192.168.1.9,17,2016-10-28T17:00:21.0,2016-10-28T17:00:23.0
192.168.1.8,192.168.1.9,53,2016-10-28T17:00:26.0,2016-10-28T17:00:41.0
192.168.1.8,192.168.1.9,53,2016-10-28T17:00:26.0,2016-10-28T17:00:51.0
2 changes: 1 addition & 1 deletion biflow_aggregator/tests/references/reference2_gt0
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
2016-10-28T17:00:01.000000,2016-10-28T17:00:23.000000,4,694
2016-10-28T17:00:26.000000,2016-10-28T17:00:41.000000,1,53
2016-10-28T17:00:26.000000,2016-10-28T17:00:51.000000,1,53
2 changes: 1 addition & 1 deletion biflow_aggregator/tests/references/reference2_gt5a
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
2016-10-28T17:00:03.000000,2016-10-28T17:00:11.000000,1,666
2016-10-28T17:00:13.000000,2016-10-28T17:00:17.000000,1,10
2016-10-28T17:00:21.000000,2016-10-28T17:00:23.000000,1,17
2016-10-28T17:00:26.000000,2016-10-28T17:00:41.000000,1,53
2016-10-28T17:00:26.000000,2016-10-28T17:00:51.000000,1,53
2 changes: 1 addition & 1 deletion biflow_aggregator/tests/references/reference2_gt5r
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
2016-10-28T17:00:01.000000,2016-10-28T17:00:11.000000,2,667
2016-10-28T17:00:13.000000,2016-10-28T17:00:17.000000,1,10
2016-10-28T17:00:21.000000,2016-10-28T17:00:23.000000,1,17
2016-10-28T17:00:26.000000,2016-10-28T17:00:41.000000,1,53
2016-10-28T17:00:26.000000,2016-10-28T17:00:51.000000,1,53
Loading