aboutsummaryrefslogtreecommitdiff
path: root/src/lib/protocols
diff options
context:
space:
mode:
authorMrTiz9 <tiziano.marra@pm.me>2020-01-30 14:57:58 +0100
committerMrTiz9 <tiziano.marra@pm.me>2020-01-30 14:57:58 +0100
commitea957687e1f9444baa69d0b2b041c1b8cf70b2f6 (patch)
treee478be3b69080c48c7b6b398ee66710efa893a5d /src/lib/protocols
parentdaf15e70bf7444649c302840e14142308c731e6c (diff)
parentc84ed5a71257d1db28036c37e90f828ed86623a0 (diff)
Merge branch 'dev' of https://github.com/ntop/nDPI into dev-unstable
Diffstat (limited to 'src/lib/protocols')
-rw-r--r--src/lib/protocols/citrix.c2
-rw-r--r--src/lib/protocols/http.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/protocols/citrix.c b/src/lib/protocols/citrix.c
index a05d748ca..65852da7f 100644
--- a/src/lib/protocols/citrix.c
+++ b/src/lib/protocols/citrix.c
@@ -51,7 +51,7 @@ static void ndpi_check_citrix(struct ndpi_detection_module_struct *ndpi_struct,
ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_CITRIX, NDPI_PROTOCOL_UNKNOWN);
}
return;
- } else if(payload_len > 4) {
+ } else if(payload_len > 22) {
char citrix_header[] = { 0x1a, 0x43, 0x47, 0x50, 0x2f, 0x30, 0x31 };
if((memcmp(packet->payload, citrix_header, sizeof(citrix_header)) == 0)
diff --git a/src/lib/protocols/http.c b/src/lib/protocols/http.c
index 14be88246..00522cfb9 100644
--- a/src/lib/protocols/http.c
+++ b/src/lib/protocols/http.c
@@ -300,7 +300,7 @@ static void check_content_type_and_change_protocol(struct ndpi_detection_module_
setHttpUserAgent(ndpi_struct, flow, token);
}
}
- } else if(memcmp(ua, "netflix-ios-app", 15) == 0) {
+ } else if((packet->user_agent_line.len > 14) && (memcmp(ua, "netflix-ios-app", 15) == 0)) {
NDPI_LOG_INFO(ndpi_struct, "found netflix\n");
ndpi_int_http_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_NETFLIX, NDPI_PROTOCOL_CATEGORY_STREAMING);
return;