aboutsummaryrefslogtreecommitdiff
path: root/src/lib/protocols
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2021-03-09 11:38:31 +0100
committerLuca Deri <deri@ntop.org>2021-03-09 11:38:31 +0100
commit477e4db650a4a565bb2288621adc01bb2a2dfed4 (patch)
tree5096088e401d0b3b806afd917f7a29aedecb1c88 /src/lib/protocols
parentbb6423a79f80898d140c946dd08ea571ae95d5e7 (diff)
Improved detection of Ookla speedtest and openspeedtest.com
Diffstat (limited to 'src/lib/protocols')
-rw-r--r--src/lib/protocols/http.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/lib/protocols/http.c b/src/lib/protocols/http.c
index c941fe145..8efaf1af4 100644
--- a/src/lib/protocols/http.c
+++ b/src/lib/protocols/http.c
@@ -348,10 +348,16 @@ static void ndpi_http_parse_subprotocol(struct ndpi_detection_module_struct *ndp
char *double_col = strchr((char*)flow->host_server_name, ':');
if(double_col) double_col[0] = '\0';
-
- ndpi_match_hostname_protocol(ndpi_struct, flow, NDPI_PROTOCOL_HTTP,
- (char *)flow->host_server_name,
- strlen((const char *)flow->host_server_name));
+
+ if(ndpi_match_hostname_protocol(ndpi_struct, flow, NDPI_PROTOCOL_HTTP,
+ (char *)flow->host_server_name,
+ strlen((const char *)flow->host_server_name)) == 0) {
+ if((strstr(flow->http.url, ":8080/downloading?n=0.") == 0)
+ || (strstr(flow->http.url, ":8080/upload?n=0.") == 0)) {
+ /* This looks like Ookla speedtest */
+ ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_OOKLA, NDPI_PROTOCOL_HTTP);
+ }
+ }
}
}