diff options
author | Nardi Ivan <nardi.ivan@gmail.com> | 2022-09-22 17:42:46 +0200 |
---|---|---|
committer | Toni <matzeton@googlemail.com> | 2022-09-23 18:33:48 +0200 |
commit | 1f345b311f7f4bb3246a649ced3cec11d742b6e4 (patch) | |
tree | af829d9cfa5840f44d7207c2554107f65de55f47 /src/lib/protocols/tls.c | |
parent | 83de3e4716eb7dcc373f0fcad4b59e83ea140fb1 (diff) |
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.
Diffstat (limited to 'src/lib/protocols/tls.c')
-rw-r--r-- | src/lib/protocols/tls.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/src/lib/protocols/tls.c b/src/lib/protocols/tls.c index 3cfe70e3a..8210f51fe 100644 --- a/src/lib/protocols/tls.c +++ b/src/lib/protocols/tls.c @@ -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 */ |