Added known protocol on unknown port for ntop

This commit is contained in:
Luca Deri
2020-12-28 16:11:39 +01:00
parent 7f944cc43b
commit 84132c6735
2 changed files with 15 additions and 2 deletions
+3 -1
View File
@@ -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) {