aboutsummaryrefslogtreecommitdiff
path: root/example/reader_util.c
diff options
context:
space:
mode:
authorIvan Nardi <12729895+IvanNardi@users.noreply.github.com>2022-07-20 14:48:09 +0200
committerGitHub <noreply@github.com>2022-07-20 14:48:09 +0200
commitc72660d7d3d406382a298e5ae4a5c11442f09099 (patch)
treebbb2f61bd87f8dc69b2704a4bd16878f4fa697d9 /example/reader_util.c
parentb472a492712dc63cdd8cfc6db5f0b8ff49e960cb (diff)
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.
Diffstat (limited to 'example/reader_util.c')
-rw-r--r--example/reader_util.c1
1 files changed, 1 insertions, 0 deletions
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))