aboutsummaryrefslogtreecommitdiff
path: root/src/lib/protocols/bittorrent.c
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2021-02-10 17:36:09 +0100
committerLuca Deri <deri@ntop.org>2021-02-10 17:36:09 +0100
commit79102ef4f27e7bbbbc4db0603e3fd7efa0ebc9f1 (patch)
tree5b7bb3fdfa12a14306cb834c7f004cf9ef4faa84 /src/lib/protocols/bittorrent.c
parent421609475ef8d99d92ca18bef900bf13058b2b06 (diff)
Added check for avoiding long dissections
Diffstat (limited to 'src/lib/protocols/bittorrent.c')
-rw-r--r--src/lib/protocols/bittorrent.c5
1 files changed, 5 insertions, 0 deletions
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;
+ }
}