From: W.C.A. Wijngaards Date: Thu, 27 Jun 2024 12:51:58 +0000 (+0200) Subject: - Fix ip-ratelimit-cookie setting, it was not applied. X-Git-Tag: release-1.21.0rc1~53 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7fbc061846ace7295fb8ab117411daf32aa282fc;p=thirdparty%2Funbound.git - Fix ip-ratelimit-cookie setting, it was not applied. --- diff --git a/doc/Changelog b/doc/Changelog index 37d2f8d99..a764646e7 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,6 @@ +17 June 2024: Wouter + - Fix ip-ratelimit-cookie setting, it was not applied. + 26 June 2024: Yorgos - Explicitly set the RD bit for the mesh query flags when prefetching. These queries have no waiting client but they need to be treated as diff --git a/services/cache/infra.c b/services/cache/infra.c index 1afa57e97..66b17c121 100644 --- a/services/cache/infra.c +++ b/services/cache/infra.c @@ -357,6 +357,7 @@ infra_create(struct config_file* cfg) return NULL; } infra_ip_ratelimit = cfg->ip_ratelimit; + infra_ip_ratelimit_cookie = cfg->ip_ratelimit_cookie; infra->client_ip_rates = slabhash_create(cfg->ip_ratelimit_slabs, INFRA_HOST_STARTSIZE, cfg->ip_ratelimit_size, &ip_rate_sizefunc, &ip_rate_compfunc, &ip_rate_delkeyfunc, &ip_rate_deldatafunc, NULL); @@ -408,6 +409,7 @@ infra_adjust(struct infra_cache* infra, struct config_file* cfg) infra->infra_keep_probing = cfg->infra_keep_probing; infra_dp_ratelimit = cfg->ratelimit; infra_ip_ratelimit = cfg->ip_ratelimit; + infra_ip_ratelimit_cookie = cfg->ip_ratelimit_cookie; 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