diff options
author | Luca Deri <deri@ntop.org> | 2020-09-24 23:26:03 +0200 |
---|---|---|
committer | Luca Deri <deri@ntop.org> | 2020-09-24 23:26:03 +0200 |
commit | 044ed14b4f23708ec05f5b5c85ca29acbf4b59db (patch) | |
tree | a03aea7d48eb8ec6b5d83da71c7ab2c40fcbc10c /src/lib/protocols/rtcp.c | |
parent | 51e86346d31f270099d4169cd2ebcb0146e5e593 (diff) |
Various optimizations to reduce not-necessary calls
Optimized various UDP dissectors
Removed dead protocols such as pando and pplive
Diffstat (limited to 'src/lib/protocols/rtcp.c')
-rw-r--r-- | src/lib/protocols/rtcp.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/protocols/rtcp.c b/src/lib/protocols/rtcp.c index 77903d6cc..0e03ea8a8 100644 --- a/src/lib/protocols/rtcp.c +++ b/src/lib/protocols/rtcp.c @@ -45,7 +45,7 @@ void ndpi_search_rtcp(struct ndpi_detection_module_struct *ndpi_struct, len = packet->payload[2+offset] * 256 + packet->payload[2+offset+1]; rtcp_section_len = (len + 1) * 4; - if(((offset+rtcp_section_len) > packet->payload_packet_len) || (rtcp_section_len == 0)) + if(((offset+rtcp_section_len) > packet->payload_packet_len) || (rtcp_section_len == 0) || (len == 0)) goto exclude_rtcp; else offset += rtcp_section_len; @@ -60,6 +60,9 @@ void ndpi_search_rtcp(struct ndpi_detection_module_struct *ndpi_struct, NDPI_LOG_INFO(ndpi_struct, "found rtcp\n"); ndpi_int_rtcp_add_connection(ndpi_struct, flow); } + + if(flow->packet_counter > 3) + NDPI_EXCLUDE_PROTO(ndpi_struct, flow); } else { exclude_rtcp: |