From ab09b8ce2e72c562ad1bfc2ec2cecca9c23fb2a8 Mon Sep 17 00:00:00 2001 From: Luca Deri Date: Mon, 20 Jun 2022 00:22:13 +0200 Subject: Added unidirectional traffic flow risk --- example/reader_util.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'example') diff --git a/example/reader_util.c b/example/reader_util.c index c50c3281f..c0bfcc459 100644 --- a/example/reader_util.c +++ b/example/reader_util.c @@ -1434,6 +1434,7 @@ static struct ndpi_proto packet_processing(struct ndpi_workflow * workflow, } ndpi_data_add_value(flow->pktlen_s_to_c, rawsize); flow->dst2src_packets++, flow->dst2src_bytes += rawsize, flow->dst2src_goodput_bytes += payload_len; + flow->risk &= ~(1UL << NDPI_UNIDIRECTIONAL_TRAFFIC); /* Clear bit */ memcpy(&flow->dst2src_last_pkt_time, &when, sizeof(when)); #ifdef DIRECTION_BINS @@ -1579,7 +1580,7 @@ static struct ndpi_proto packet_processing(struct ndpi_workflow * workflow, } } } - + #if 0 if(flow->risk != 0) { FILE *r = fopen("/tmp/e", "a"); -- cgit v1.2.3