From 3ae721db6ca60fcb89e03685f4868709d45619ef Mon Sep 17 00:00:00 2001 From: Matthijs Mekking Date: Thu, 24 Aug 2023 11:33:05 +0200 Subject: [PATCH] After cache flush, restore serve-stale settings When flushing the cache, we create a new cache database. The serve-stale settings need to be restored after doing this. We already did this for max-stale-ttl, but forgot to do this for stale-refresh-time. --- lib/dns/cache.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/dns/cache.c b/lib/dns/cache.c index 10fc1ae6bf..f7c3bbef99 100644 --- a/lib/dns/cache.c +++ b/lib/dns/cache.c @@ -99,6 +99,7 @@ cache_create_db(dns_cache_t *cache, dns_db_t **db) { dns_dbtype_cache, cache->rdclass, 1, argv, db); if (result == ISC_R_SUCCESS) { dns_db_setservestalettl(*db, cache->serve_stale_ttl); + dns_db_setservestalerefresh(*db, cache->serve_stale_refresh); } return (result); }