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.
This commit is contained in:
Matthijs Mekking
2023-08-24 11:33:05 +02:00
parent 0f593fd70a
commit 3ae721db6c

View 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);
}