From 241c42ad7ed67872aba064c5ffa5aeb0b274c527 Mon Sep 17 00:00:00 2001 From: Ivan Nardi <12729895+IvanNardi@users.noreply.github.com> Date: Tue, 12 Dec 2023 19:44:03 +0100 Subject: ndpiReader: fix `guessed_flow_protocols` statistic (#2203) Increment the counter only if the flow has been guessed --- example/reader_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'example/reader_util.c') diff --git a/example/reader_util.c b/example/reader_util.c index 47873cbe0..64b00b18f 100644 --- a/example/reader_util.c +++ b/example/reader_util.c @@ -1744,7 +1744,7 @@ static struct ndpi_proto packet_processing(struct ndpi_workflow * workflow, flow->detected_protocol = ndpi_detection_giveup(workflow->ndpi_struct, flow->ndpi_flow, enable_protocol_guess, &proto_guessed); - if(enable_protocol_guess) workflow->stats.guessed_flow_protocols++; + if(proto_guessed) workflow->stats.guessed_flow_protocols++; } process_ndpi_collected_info(workflow, flow); -- cgit v1.2.3