diff options
author | Luca Deri <deri@ntop.org> | 2021-02-10 17:36:09 +0100 |
---|---|---|
committer | Luca Deri <deri@ntop.org> | 2021-02-10 17:36:09 +0100 |
commit | 79102ef4f27e7bbbbc4db0603e3fd7efa0ebc9f1 (patch) | |
tree | 5b7bb3fdfa12a14306cb834c7f004cf9ef4faa84 /src/lib/protocols/jabber.c | |
parent | 421609475ef8d99d92ca18bef900bf13058b2b06 (diff) |
Added check for avoiding long dissections
Diffstat (limited to 'src/lib/protocols/jabber.c')
-rw-r--r-- | src/lib/protocols/jabber.c | 6 |
1 files changed, 5 insertions, 1 deletions
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) { |