From c72660d7d3d406382a298e5ae4a5c11442f09099 Mon Sep 17 00:00:00 2001 From: Ivan Nardi <12729895+IvanNardi@users.noreply.github.com> Date: Wed, 20 Jul 2022 14:48:09 +0200 Subject: reader_util: stop processing a flow (#1666) We should stop processing a flow if all protocols have been excluded or if we have already processed too many packets. --- src/lib/ndpi_main.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c index 2ba5bf385..172149824 100644 --- a/src/lib/ndpi_main.c +++ b/src/lib/ndpi_main.c @@ -6086,6 +6086,7 @@ ndpi_protocol ndpi_detection_process_packet(struct ndpi_detection_module_struct if(ndpi_str->max_packets_to_process > 0 && flow->num_processed_pkts >= ndpi_str->max_packets_to_process) { flow->extra_packets_func = NULL; /* To allow ndpi_extra_dissection_possible() to fail */ + flow->fail_with_unknown = 1; return(ret); /* Avoid spending too much time with this flow */ } -- cgit v1.2.3