]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
some TLDs have only 1 NSEC3 record
authorbert hubert <bert.hubert@netherlabs.nl>
Fri, 1 Jul 2016 09:50:04 +0000 (11:50 +0200)
committerbert hubert <bert.hubert@netherlabs.nl>
Fri, 1 Jul 2016 09:50:04 +0000 (11:50 +0200)
pdns/validate.cc

index 6918f5f06a3b2cc5ae38450aa867821f11c06b5f..ee326b321a5ec4385073e820c1c695096a213614 100644 (file)
@@ -401,10 +401,13 @@ vState getKeysFor(DNSRecordOracle& dro, const DNSName& zone, keyset_t &keyset)
 
               auto nsec3 = std::dynamic_pointer_cast<NSEC3RecordContent>(r);
               string h = hashQNameWithSalt(nsec3->d_salt, nsec3->d_iterations, qname);
+              //              cerr<<"Salt length: "<<nsec3->d_salt.length()<<", iterations: "<<nsec3->d_iterations<<", hashed: "<<qname<<endl;
               LOG("\tquery hash: "<<toBase32Hex(h)<<endl);
               string beginHash=fromBase32Hex(v.first.first.getRawLabels()[0]);
               if( (beginHash < h && h < nsec3->d_nexthash) ||
-                  (nsec3->d_nexthash > h  && beginHash > nsec3->d_nexthash)) { //wrap
+                  (nsec3->d_nexthash > h  && beginHash > nsec3->d_nexthash) ||  //wrap
+                  beginHash == nsec3->d_nexthash)  // "we have only 1 NSEC3 record, LOL!"  
+              {
                 LOG("Denies existence of DS!"<<endl);
                 return Insecure;
               }