]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
After cache flush, restore serve-stale settings
authorMatthijs Mekking <matthijs@isc.org>
Thu, 24 Aug 2023 09:33:05 +0000 (11:33 +0200)
committerMatthijs Mekking <matthijs@isc.org>
Thu, 31 Aug 2023 09:07:35 +0000 (11:07 +0200)
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

index 10fc1ae6bf1fb73be93282af20fb20de0b8b385c..f7c3bbef99430ab50613b1c555a5913e49cc875a 100644 (file)
@@ -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);
 }