aboutsummaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorSimone Mainardi <mainardi@ntop.org>2019-01-15 09:56:33 +0100
committerSimone Mainardi <mainardi@ntop.org>2019-01-15 09:56:33 +0100
commit2ade0be365429a404d63f8ee20f1b59650cde710 (patch)
tree02aab234c119a7c0a57caca0b64f1555db705ae8 /src/lib
parentf2f2dbe381c0f92f0cc859835238723fea77c767 (diff)
Fixes ookla lru cache use with IPv6
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/protocols/http.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/protocols/http.c b/src/lib/protocols/http.c
index b1917281c..661e55732 100644
--- a/src/lib/protocols/http.c
+++ b/src/lib/protocols/http.c
@@ -630,7 +630,7 @@ static void ndpi_check_http_tcp(struct ndpi_detection_module_struct *ndpi_struct
return;
}
- if((packet->iph != NULL) && (packet->payload_packet_len == 23) && (memcmp(packet->payload, "<policy-file-request/>", 23) == 0)) {
+ if((packet->payload_packet_len == 23) && (memcmp(packet->payload, "<policy-file-request/>", 23) == 0)) {
/*
<policy-file-request/>
<cross-domain-policy>
@@ -644,7 +644,7 @@ static void ndpi_check_http_tcp(struct ndpi_detection_module_struct *ndpi_struct
if(ndpi_struct->ookla_cache == NULL)
ndpi_struct->ookla_cache = lruc_new(4*1024, 1024);
- if(ndpi_struct->ookla_cache != NULL) {
+ if(packet->iph != NULL && ndpi_struct->ookla_cache != NULL) {
u_int8_t *dummy = (u_int8_t*)ndpi_malloc(sizeof(u_int8_t));
if(dummy) {