]> granicus.if.org Git - pdns/commitdiff
Correct odername/auth when increasing serial
authorRuben d'Arco <cyclops@prof-x.net>
Thu, 9 May 2013 19:44:44 +0000 (21:44 +0200)
committermind04 <mind04@monshouwer.org>
Fri, 12 Jul 2013 15:26:19 +0000 (17:26 +0200)
pdns/rfc2136handler.cc

index ff3e7c7711ab13f00945d824cf1813fd837f2037..7087c40964a9afa32de768fb2c59b7d5de0b7ee6 100755 (executable)
@@ -856,11 +856,13 @@ void PacketHandler::increaseSerial(const string &msgPrefix, const DomainInfo *di
   L<<Logger::Notice<<msgPrefix<<"Increasing SOA serial ("<<oldSerial<<" -> "<<soa2Update.serial<<")"<<endl;
 
   //Correct ordername + auth flag
-  if(haveNSEC3) {
+  if (haveNSEC3 && narrow)
+    di->backend->nullifyDNSSECOrderNameAndUpdateAuth(di->id, newRec.qname, true);
+  else if (haveNSEC3) {
     string hashed;
-    if(!narrow) 
-      hashed=toLower(toBase32Hex(hashQNameWithSalt(ns3pr->d_iterations, ns3pr->d_salt, newRec.qname)));
-        
+    if (!narrow)
+      hashed = toLower(toBase32Hex(hashQNameWithSalt(ns3pr->d_iterations, ns3pr->d_salt, newRec.qname)));
+
     di->backend->updateDNSSECOrderAndAuthAbsolute(di->id, newRec.qname, hashed, true);
   }
   else // NSEC