Sizes of LRU caches are now configurable
0 as size value disable the cache. The diffs in unit tests are due to the fact that some lookups are performed before the first insert: before this change these lookups weren't counted because the cache was not yet initialized, now they are.
This commit is contained in:
@@ -695,9 +695,6 @@ static void processCertificateElements(struct ndpi_detection_module_struct *ndpi
|
||||
flow->category = ndpi_get_proto_category(ndpi_struct, ret);
|
||||
ndpi_check_subprotocol_risk(ndpi_struct, flow, proto_id);
|
||||
|
||||
if(ndpi_struct->tls_cert_cache == NULL)
|
||||
ndpi_struct->tls_cert_cache = ndpi_lru_cache_init(1024);
|
||||
|
||||
if(ndpi_struct->tls_cert_cache && packet->iph && packet->tcp) {
|
||||
u_int32_t key = packet->iph->saddr + packet->tcp->source; /* Server */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user