aboutsummaryrefslogtreecommitdiff
path: root/example/reader_util.c
diff options
context:
space:
mode:
authorIvan Nardi <12729895+IvanNardi@users.noreply.github.com>2022-04-25 11:00:02 +0200
committerGitHub <noreply@github.com>2022-04-25 11:00:02 +0200
commit075bce5f3de463975464472158dca980a45f48a3 (patch)
tree90cccc07f7021880f2824e6245afae2d23986650 /example/reader_util.c
parentac0f50b56115acc7c8107d9b2661cac6b0d7bf2b (diff)
XIAOMI: add detection of Xiaomi traffic (#1529)
Most of the credits should go to @utoni (see #1521)
Diffstat (limited to 'example/reader_util.c')
-rw-r--r--example/reader_util.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/example/reader_util.c b/example/reader_util.c
index 730d14625..dec8e1216 100644
--- a/example/reader_util.c
+++ b/example/reader_util.c
@@ -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')