Improved RTSP detection the second. (#1232) (#1233)

* RTSP is no subprotocol of HTTP (most of the time)
 * detection patterns should stay in rtsp.c
 * set detected HTTP protocol only if at least a valid HTTP method detected

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
This commit is contained in:
Toni
2021-07-07 09:55:36 +02:00
committed by GitHub
parent c408710c52
commit 34d0718bca
4 changed files with 11 additions and 8 deletions
+5 -2
View File
@@ -47,8 +47,11 @@ void ndpi_search_rtsp_tcp_udp(struct ndpi_detection_module_struct
NDPI_LOG_DBG(ndpi_struct, "search RTSP\n");
if (flow->detected_protocol_stack[0] == NDPI_PROTOCOL_HTTP &&
packet->parsed_lines > 0 &&
if (packet->parsed_lines == 0)
{
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)
{