aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/include/ndpi_typedefs.h3
-rw-r--r--src/lib/protocols/http.c4
2 files changed, 3 insertions, 4 deletions
diff --git a/src/include/ndpi_typedefs.h b/src/include/ndpi_typedefs.h
index 79c8b6c71..0ce2310c8 100644
--- a/src/include/ndpi_typedefs.h
+++ b/src/include/ndpi_typedefs.h
@@ -1239,6 +1239,7 @@ struct ndpi_flow_struct {
u_int8_t num_request_headers, num_response_headers;
u_int8_t request_version; /* 0=1.0 and 1=1.1. Create an enum for this? */
u_int16_t response_status_code; /* 200, 404, etc. */
+ u_char detected_os[32]; /* Via HTTP/QUIC User-Agent */
} http;
/*
@@ -1316,8 +1317,6 @@ struct ndpi_flow_struct {
} ubntac2;
struct {
- /* Via HTTP User-Agent */
- u_char detected_os[32];
/* Via HTTP X-Forwarded-For */
u_char nat_ip[24];
} http;
diff --git a/src/lib/protocols/http.c b/src/lib/protocols/http.c
index eec2a7bf1..07b777863 100644
--- a/src/lib/protocols/http.c
+++ b/src/lib/protocols/http.c
@@ -336,8 +336,8 @@ static void setHttpUserAgent(struct ndpi_detection_module_struct *ndpi_struct,
/* Good reference for future implementations:
* https://github.com/ua-parser/uap-core/blob/master/regexes.yaml */
- snprintf((char*)flow->protos.http.detected_os,
- sizeof(flow->protos.http.detected_os), "%s", ua);
+ snprintf((char*)flow->http.detected_os,
+ sizeof(flow->http.detected_os), "%s", ua);
}
/* ************************************************************* */