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/jabber.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/lib/protocols/jabber.c') diff --git a/src/lib/protocols/jabber.c b/src/lib/protocols/jabber.c index 621cf794d..c513f216a 100644 --- a/src/lib/protocols/jabber.c +++ b/src/lib/protocols/jabber.c @@ -67,11 +67,15 @@ void ndpi_search_jabber_tcp(struct ndpi_detection_module_struct *ndpi_struct, st struct ndpi_packet_struct *packet = &flow->packet; struct ndpi_id_struct *src = flow->src; struct ndpi_id_struct *dst = flow->dst; - u_int16_t x; NDPI_LOG_DBG(ndpi_struct, "search JABBER\n"); + if (flow->packet_counter > 5) { + NDPI_EXCLUDE_PROTO(ndpi_struct, flow); + return; + } + /* search for jabber file transfer */ /* this part is working asymmetrically */ if (packet->tcp != NULL && packet->tcp->syn != 0 && packet->payload_packet_len == 0) { -- cgit v1.2.3