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. --- example/reader_util.c | 1 + 1 file changed, 1 insertion(+) (limited to 'example/reader_util.c') diff --git a/example/reader_util.c b/example/reader_util.c index 91eeb0775..94564bfed 100644 --- a/example/reader_util.c +++ b/example/reader_util.c @@ -1562,6 +1562,7 @@ static struct ndpi_proto packet_processing(struct ndpi_workflow * workflow, iph ? (uint8_t *)iph : (uint8_t *)iph6, ipsize, time_ms); + enough_packets |= ndpi_flow->fail_with_unknown; if(enough_packets || (flow->detected_protocol.app_protocol != NDPI_PROTOCOL_UNKNOWN)) { if((!enough_packets) && ndpi_extra_dissection_possible(workflow->ndpi_struct, ndpi_flow)) -- cgit v1.2.3