]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
auth api: flush all caches when flushing 13514/head
authorChris Hofstaedtler <chris.hofstaedtler@deduktiva.com>
Mon, 20 Nov 2023 13:44:49 +0000 (14:44 +0100)
committerChris Hofstaedtler <chris.hofstaedtler@deduktiva.com>
Fri, 15 Dec 2023 19:10:12 +0000 (20:10 +0100)
So far we never flushed the DNSSEC caches, except when DELETEing a domain.
However clearly some operations can affect the DNSSEC settings, and then the
caches should go.

Also do this for the flush API, to be consistent, and for users writing to the
DNSSEC settings/data externally.

pdns/ws-auth.cc

index 058b91796d508bc42accf1a738909702ddcb7774..ca7b60c81ab3e35f93c88e741ab59a8253a40b48 100644 (file)
@@ -2331,6 +2331,7 @@ static void patchZone(UeberBackend& B, const DNSName& zonename, DomainInfo& di,
 
   di.backend->commitTransaction();
 
+  DNSSECKeeper::clearCaches(zonename);
   purgeAuthCaches(zonename.toString() + "$");
 
   resp->body = "";
@@ -2459,6 +2460,7 @@ static void apiServerCacheFlush(HttpRequest* req, HttpResponse* resp) {
     }
   }
 
+  DNSSECKeeper::clearCaches(canon);
   // purge entire zone from cache, not just zone-level records.
   uint64_t count = purgeAuthCaches(canon.toString() + "$");
   resp->setJsonBody(Json::object {