]> granicus.if.org Git - pdns/commitdiff
auth: Rectify for ent records in narrow zones was slightly wrong.
authorKees Monshouwer <mind04@monshouwer.org>
Thu, 14 Mar 2019 22:51:23 +0000 (23:51 +0100)
committermind04 <mind04@monshouwer.org>
Fri, 15 Mar 2019 09:12:21 +0000 (10:12 +0100)
pdns/dbdnsseckeeper.cc

index 2f63af582483931ffd4ad9e3c65b11b55464b848..1eef0fc882b9f98faef01492d52d9f270a771be0 100644 (file)
@@ -692,7 +692,7 @@ bool DNSSECKeeper::rectifyZone(const DNSName& zone, string& error, string& info,
   }
 
   set<DNSName> nsec3set;
-  if (haveNSEC3 && !narrow) {
+  if (haveNSEC3) {
     for (auto &loopRR: rrs) {
       bool skip=false;
       DNSName shorter = loopRR.qname;
@@ -743,12 +743,12 @@ bool DNSSECKeeper::rectifyZone(const DNSName& zone, string& error, string& info,
 
     if(haveNSEC3) // NSEC3
     {
-      if(!narrow && nsec3set.count(qname)) {
-        ordername=DNSName(toBase32Hex(hashQNameWithSalt(ns3pr, qname)));
-        if(!realrr)
+      if(nsec3set.count(qname)) {
+        if(!narrow)
+          ordername=DNSName(toBase32Hex(hashQNameWithSalt(ns3pr, qname)));
+        if(!realrr && !isOptOut)
           auth=true;
-      } else if(!realrr)
-        auth=false;
+      }
     }
     else if (realrr && securedZone) // NSEC
       ordername=qname.makeRelative(zone);