aboutsummaryrefslogtreecommitdiff
path: root/src/lib/ndpi_main.c
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2018-12-17 22:33:58 +0100
committerLuca Deri <deri@ntop.org>2018-12-17 22:33:58 +0100
commit92ad05733246738b0fc3bb6b2ddb83605e6babad (patch)
tree7535075ef350a18ab12ca92f10b9c015fe4fd631 /src/lib/ndpi_main.c
parentd2b2aba6e86b78bd9a9abdf97b51b643da1ef0dd (diff)
Added Ookla cache
Diffstat (limited to 'src/lib/ndpi_main.c')
-rw-r--r--src/lib/ndpi_main.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c
index b5b3c9c6b..e882feaa6 100644
--- a/src/lib/ndpi_main.c
+++ b/src/lib/ndpi_main.c
@@ -30,6 +30,7 @@
#include <sys/types.h>
#include "ahocorasick.h"
#include "libcache.h"
+#include "lruc.h"
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_UNKNOWN
@@ -2427,14 +2428,16 @@ void ndpi_exit_detection_module(struct ndpi_detection_module_struct *ndpi_struct
ndpi_free(ndpi_struct->proto_defaults[i].protoName);
}
-/* NDPI_PROTOCOL_TINC */
+ /* NDPI_PROTOCOL_TINC */
if(ndpi_struct->tinc_cache)
cache_free((cache_t)(ndpi_struct->tinc_cache));
- if(ndpi_struct->protocols_ptree)
- ndpi_Destroy_Patricia((patricia_tree_t*)ndpi_struct->protocols_ptree,
- free_ptree_data);
+ if(ndpi_struct->ookla_cache)
+ lruc_free((lruc*)ndpi_struct->ookla_cache);
+ if(ndpi_struct->protocols_ptree)
+ ndpi_Destroy_Patricia((patricia_tree_t*)ndpi_struct->protocols_ptree, free_ptree_data);
+
if(ndpi_struct->udpRoot != NULL)
ndpi_tdestroy(ndpi_struct->udpRoot, ndpi_free);
if(ndpi_struct->tcpRoot != NULL)
@@ -3293,6 +3296,9 @@ void ndpi_set_protocol_detection_bitmask2(struct ndpi_detection_module_struct *n
/* WHATSAPP */
init_whatsapp_dissector(ndpi_struct, &a, detection_bitmask);
+ /* OOKLA */
+ init_ookla_dissector(ndpi_struct, &a, detection_bitmask);
+
/* AMQP */
init_amqp_dissector(ndpi_struct, &a, detection_bitmask);