From 79102ef4f27e7bbbbc4db0603e3fd7efa0ebc9f1 Mon Sep 17 00:00:00 2001 From: Luca Deri Date: Wed, 10 Feb 2021 17:36:09 +0100 Subject: Added check for avoiding long dissections --- src/lib/protocols/bittorrent.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/lib/protocols/bittorrent.c') diff --git a/src/lib/protocols/bittorrent.c b/src/lib/protocols/bittorrent.c index bc5d5b358..55e9b3173 100644 --- a/src/lib/protocols/bittorrent.c +++ b/src/lib/protocols/bittorrent.c @@ -493,6 +493,11 @@ void ndpi_search_bittorrent(struct ndpi_detection_module_struct *ndpi_struct, st NDPI_EXCLUDE_PROTO(ndpi_struct, flow); } } + + if(flow->packet_counter > 8) { + NDPI_EXCLUDE_PROTO(ndpi_struct, flow); + return; + } } -- cgit v1.2.3