diff options
author | Toni Uhlig <matzeton@googlemail.com> | 2021-07-06 19:59:56 +0200 |
---|---|---|
committer | Toni Uhlig <matzeton@googlemail.com> | 2021-07-06 19:59:56 +0200 |
commit | fd2b524dfb8842a575980d9280862eb6b82e1d7c (patch) | |
tree | e521b3380e07a6d71bc6430c95808b2414f15f1a /src/lib/protocols/rtsp.c | |
parent | c408710c5247346e4bd2f9568e848becc592b603 (diff) |
Improved RTSP detection the second. (#1232)improved/rtsp_detection_the_second
* 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>
Diffstat (limited to 'src/lib/protocols/rtsp.c')
-rw-r--r-- | src/lib/protocols/rtsp.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/protocols/rtsp.c b/src/lib/protocols/rtsp.c index 435d09db5..033c5c324 100644 --- a/src/lib/protocols/rtsp.c +++ b/src/lib/protocols/rtsp.c @@ -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) { |