aboutsummaryrefslogtreecommitdiff
path: root/src/lib/protocols
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2020-08-31 08:47:16 +0200
committerLuca Deri <deri@ntop.org>2020-08-31 08:47:16 +0200
commit460ff3c7aba42d0e7b99a227e0cb846af296e4e0 (patch)
tree8f8cf5b66e98d0dd32802c0c52e1776c8bea9776 /src/lib/protocols
parent029448759b4036f7c26444b5055ac3a2607de972 (diff)
Added (optional) notifier for LRU add
Diffstat (limited to 'src/lib/protocols')
-rw-r--r--src/lib/protocols/hangout.c2
-rw-r--r--src/lib/protocols/stun.c5
2 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/protocols/hangout.c b/src/lib/protocols/hangout.c
index fe0d3cb05..acddfed7f 100644
--- a/src/lib/protocols/hangout.c
+++ b/src/lib/protocols/hangout.c
@@ -108,6 +108,8 @@ void ndpi_search_hangout(struct ndpi_detection_module_struct *ndpi_struct,
#endif
ndpi_lru_add_to_cache(ndpi_struct->stun_cache, key, NDPI_PROTOCOL_HANGOUT_DUO);
+ if(ndpi_struct->ndpi_notify_lru_add_handler_ptr)
+ ndpi_struct->ndpi_notify_lru_add_handler_ptr(ndpi_hangout_cache, key, NDPI_PROTOCOL_HANGOUT_DUO);
}
ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_HANGOUT_DUO,
diff --git a/src/lib/protocols/stun.c b/src/lib/protocols/stun.c
index 87d090daf..703b46be7 100644
--- a/src/lib/protocols/stun.c
+++ b/src/lib/protocols/stun.c
@@ -88,7 +88,12 @@ void ndpi_int_stun_add_connection(struct ndpi_detection_module_struct *ndpi_stru
#endif
ndpi_lru_add_to_cache(ndpi_struct->stun_cache, key, app_proto);
+ if(ndpi_struct->ndpi_notify_lru_add_handler_ptr)
+ ndpi_struct->ndpi_notify_lru_add_handler_ptr(ndpi_stun_cache, key, app_proto);
+
ndpi_lru_add_to_cache(ndpi_struct->stun_cache, key_rev, app_proto);
+ if(ndpi_struct->ndpi_notify_lru_add_handler_ptr)
+ ndpi_struct->ndpi_notify_lru_add_handler_ptr(ndpi_stun_cache, key_rev, app_proto);
}
}
}