From 2ade0be365429a404d63f8ee20f1b59650cde710 Mon Sep 17 00:00:00 2001 From: Simone Mainardi Date: Tue, 15 Jan 2019 09:56:33 +0100 Subject: Fixes ookla lru cache use with IPv6 --- src/lib/protocols/http.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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, "", 23) == 0)) { + if((packet->payload_packet_len == 23) && (memcmp(packet->payload, "", 23) == 0)) { /* @@ -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) { -- cgit v1.2.3