diff options
Diffstat (limited to 'src/lib/protocols')
-rw-r--r-- | src/lib/protocols/http.c | 7 | ||||
-rw-r--r-- | src/lib/protocols/rtsp.c | 7 |
2 files changed, 9 insertions, 5 deletions
diff --git a/src/lib/protocols/http.c b/src/lib/protocols/http.c index 36da51078..6a3df8e26 100644 --- a/src/lib/protocols/http.c +++ b/src/lib/protocols/http.c @@ -499,8 +499,6 @@ static void check_content_type_and_change_protocol(struct ndpi_detection_module_ struct ndpi_packet_struct *packet = &flow->packet; int ret; - ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_HTTP, NDPI_PROTOCOL_UNKNOWN); - if(flow->http_detected && (flow->http.response_status_code != 0)) return; @@ -667,7 +665,10 @@ static void check_content_type_and_change_protocol(struct ndpi_detection_module_ } } - ndpi_int_http_add_connection(ndpi_struct, flow, packet->detected_protocol_stack[0], NDPI_PROTOCOL_CATEGORY_WEB); + if (ndpi_get_http_method(ndpi_struct, flow) != NDPI_HTTP_METHOD_UNKNOWN) + { + ndpi_int_http_add_connection(ndpi_struct, flow, packet->detected_protocol_stack[0], NDPI_PROTOCOL_CATEGORY_WEB); + } } /* ************************************************************* */ 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) { |