From 84132c6735935ce494a665557dcbabfd2703b036 Mon Sep 17 00:00:00 2001 From: Luca Deri Date: Mon, 28 Dec 2020 16:11:39 +0100 Subject: Added known protocol on unknown port for ntop --- src/lib/protocols/http.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/lib/protocols/http.c') diff --git a/src/lib/protocols/http.c b/src/lib/protocols/http.c index cc81644aa..f130ea6b9 100644 --- a/src/lib/protocols/http.c +++ b/src/lib/protocols/http.c @@ -446,8 +446,10 @@ static void check_content_type_and_change_protocol(struct ndpi_detection_module_ } if(packet->server_line.ptr != NULL && (packet->server_line.len > 7)) { - if(strncmp((const char *)packet->server_line.ptr, "ntopng ", 7) == 0) + if(strncmp((const char *)packet->server_line.ptr, "ntopng ", 7) == 0) { ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_NTOP, NDPI_PROTOCOL_HTTP); + NDPI_CLR_BIT(flow->risk, NDPI_KNOWN_PROTOCOL_ON_NON_STANDARD_PORT); + } } if(packet->user_agent_line.ptr != NULL && packet->user_agent_line.len != 0) { -- cgit v1.2.3