mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-02-09 22:03:15 -05:00
- Resize ratelimit and ip-ratelimit caches if changed on reload.
git-svn-id: file:///svn/unbound/trunk@4787 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
330c6e1cb0
commit
7579216922
2 changed files with 9 additions and 1 deletions
|
|
@ -4,6 +4,7 @@
|
|||
in the ssl library.
|
||||
- Fix that ratelimit and ip-ratelimit are applied after reload of
|
||||
changed config file.
|
||||
- Resize ratelimit and ip-ratelimit caches if changed on reload.
|
||||
|
||||
16 July 2018: Wouter
|
||||
- Fix qname minimisation NXDOMAIN validation lookup failures causing
|
||||
|
|
|
|||
9
services/cache/infra.c
vendored
9
services/cache/infra.c
vendored
|
|
@ -299,8 +299,15 @@ infra_adjust(struct infra_cache* infra, struct config_file* cfg)
|
|||
infra_ip_ratelimit = cfg->ip_ratelimit;
|
||||
maxmem = cfg->infra_cache_numhosts * (sizeof(struct infra_key)+
|
||||
sizeof(struct infra_data)+INFRA_BYTES_NAME);
|
||||
/* divide cachesize by slabs and multiply by slabs, because if the
|
||||
* cachesize is not an even multiple of slabs, that is the resulting
|
||||
* size of the slabhash */
|
||||
if(maxmem != slabhash_get_size(infra->hosts) ||
|
||||
cfg->infra_cache_slabs != infra->hosts->size) {
|
||||
cfg->infra_cache_slabs != infra->hosts->size ||
|
||||
cfg->ratelimit_slabs != infra->domain_rates->size ||
|
||||
cfg->ratelimit_size/cfg->ratelimit_slabs*cfg->ratelimit_slabs != slabhash_get_size(infra->domain_rates) ||
|
||||
cfg->ip_ratelimit_slabs != infra->client_ip_rates->size ||
|
||||
cfg->ip_ratelimit_size/cfg->ip_ratelimit_slabs*cfg->ip_ratelimit_slabs != slabhash_get_size(infra->client_ip_rates)) {
|
||||
infra_delete(infra);
|
||||
infra = infra_create(cfg);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue