]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix ip-ratelimit-cookie setting, it was not applied.
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Thu, 27 Jun 2024 12:51:58 +0000 (14:51 +0200)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Thu, 27 Jun 2024 12:51:58 +0000 (14:51 +0200)
doc/Changelog
services/cache/infra.c

index 37d2f8d9903546db1c3c32d8974e4b07d2762ea6..a764646e7ba8f899f71c3c9eb77d9bcc31afc3b8 100644 (file)
@@ -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
index 1afa57e97f425a3bd0519bc85964512b39061d68..66b17c1218eaf500fe1cc3e703b8b7b6d20d0d26 100644 (file)
@@ -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