diff options
author | Toni Uhlig <matzeton@googlemail.com> | 2021-07-30 14:11:46 +0200 |
---|---|---|
committer | Toni Uhlig <matzeton@googlemail.com> | 2021-07-30 14:11:46 +0200 |
commit | acac47ded3403f205b4c44733be81cd716921927 (patch) | |
tree | 4dd5ae6300cbcf64ba359c644ecf5b8ea4fb9f88 /src/lib/protocols/rtsp.c | |
parent | 13c5d6801e3b9fdc71bec88c300243a939346a8d (diff) |
Improved RTSP detection and fixed HTTP false-positive. Fixes #1229.improved/rtsp_detection_the_third
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'src/lib/protocols/rtsp.c')
-rw-r--r-- | src/lib/protocols/rtsp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/protocols/rtsp.c b/src/lib/protocols/rtsp.c index 033c5c324..5a14f1d83 100644 --- a/src/lib/protocols/rtsp.c +++ b/src/lib/protocols/rtsp.c @@ -51,8 +51,8 @@ void ndpi_search_rtsp_tcp_udp(struct ndpi_detection_module_struct { ndpi_parse_packet_line_info(ndpi_struct, flow); } + if (packet->parsed_lines > 0 && - LINE_STARTS(packet->line[0], "SETUP rtsp://") != 0 && LINE_ENDS(packet->line[0], "RTSP/1.0") != 0) { ndpi_int_rtsp_add_connection(ndpi_struct, flow); @@ -102,6 +102,7 @@ void ndpi_search_rtsp_tcp_udp(struct ndpi_detection_module_struct return; } } + if (packet->udp != NULL && packet->detected_protocol_stack[0] == NDPI_PROTOCOL_UNKNOWN && ((NDPI_COMPARE_PROTOCOL_TO_BITMASK(flow->excluded_protocol_bitmask, NDPI_PROTOCOL_RTP) == 0) || (NDPI_COMPARE_PROTOCOL_TO_BITMASK(flow->excluded_protocol_bitmask, NDPI_PROTOCOL_RTCP) == 0) |