]> git.ipfire.org Git - thirdparty/knot-dns.git/commitdiff
zone: change constant random part of rebootstrap scheduling to be progressive
authorDaniel Salzman <daniel.salzman@nic.cz>
Wed, 12 Nov 2025 13:01:41 +0000 (14:01 +0100)
committerDaniel Salzman <daniel.salzman@nic.cz>
Wed, 26 Nov 2025 14:49:47 +0000 (15:49 +0100)
src/knot/zone/zone.c

index b09a5e08fe9f7300f4dc2f84275de1b4359058e1..82b1ef3cb050b38cad22a4e5efc950cc5e929bef 100644 (file)
@@ -1028,5 +1028,5 @@ time_t zone_bootstrap_next(uint8_t *count)
        }
 
        // Add a random delay to prevent burst refresh.
-       return increment + dnssec_random_uint16_t() % 30;
+       return increment + dnssec_random_uint16_t() % MIN(30, (1 + *count) * 5);
 }