]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Also remove NSEC3 record pairs when removing ENT.
authorMiod Vallat <miod.vallat@powerdns.com>
Thu, 3 Jul 2025 10:48:52 +0000 (12:48 +0200)
committerMiod Vallat <miod.vallat@powerdns.com>
Thu, 3 Jul 2025 13:38:42 +0000 (15:38 +0200)
Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
modules/lmdbbackend/lmdbbackend.cc

index 737dcca2daf9b34d9156dd875d23fd077232a73e..e305792df39d88569cdfcd8cbd3d68973bbcff4a 100644 (file)
@@ -2808,14 +2808,16 @@ bool LMDBBackend::updateEmptyNonTerminals(domainid_t domain_id, set<DNSName>& in
 
       std::string ser = serializeToBuffer(lrr);
 
-      txn->txn->put(txn->db->dbi, co(domain_id, lrr.qname, 0), ser);
+      txn->txn->put(txn->db->dbi, co(domain_id, lrr.qname, QType::ENT), ser);
 
       // cout <<" +"<<n<<endl;
     }
     for (auto n : erase) {
       // cout <<" -"<<n<<endl;
       n.makeUsRelative(di.zone);
-      txn->txn->del(txn->db->dbi, co(domain_id, n, 0));
+      // Remove possible NSEC3 record pair tied to that ENT.
+      deleteNSEC3RecordPair(txn, domain_id, n);
+      txn->txn->del(txn->db->dbi, co(domain_id, n, QType::ENT));
     }
   }
   if (needCommit)