XIAOMI: add detection of Xiaomi traffic (#1529)

Most of the credits should go to @utoni (see #1521)
This commit is contained in:
Ivan Nardi
2022-04-25 11:00:02 +02:00
committed by GitHub
parent ac0f50b561
commit 075bce5f3d
13 changed files with 170 additions and 12 deletions
+2 -1
View File
@@ -1118,7 +1118,8 @@ void process_ndpi_collected_info(struct ndpi_workflow * workflow, struct ndpi_fl
ndpi_snprintf(flow->http.request_content_type, sizeof(flow->http.request_content_type), "%s", flow->ndpi_flow->http.request_content_type ? flow->ndpi_flow->http.request_content_type : "");
ndpi_snprintf(flow->http.user_agent, sizeof(flow->http.user_agent), "%s", flow->ndpi_flow->http.user_agent ? flow->ndpi_flow->http.user_agent : "");
}
} else if(is_ndpi_proto(flow, NDPI_PROTOCOL_SSDP)) {
} else if(is_ndpi_proto(flow, NDPI_PROTOCOL_SSDP) ||
is_ndpi_proto(flow, NDPI_PROTOCOL_XIAOMI)) {
ndpi_snprintf(flow->http.user_agent, sizeof(flow->http.user_agent), "%s", flow->ndpi_flow->http.user_agent ? flow->ndpi_flow->http.user_agent : "");
} else if(is_ndpi_proto(flow, NDPI_PROTOCOL_TELNET)) {
if(flow->ndpi_flow->protos.telnet.username[0] != '\0')