]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
teach bindbackend about the possibility of empty nsec3 salts
authorBert Hubert <bert.hubert@netherlabs.nl>
Sat, 15 Jan 2011 11:23:52 +0000 (11:23 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Sat, 15 Jan 2011 11:23:52 +0000 (11:23 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@1885 d19b8d6e-7fed-0310-83ef-9ca221ded41b

pdns/backends/bind/bindbackend2.cc

index cff471cd9179288ef06d5e6bac20e91c4fbcefb5..8fd53a23feb0ed11057057d4635382372e211fdb 100644 (file)
@@ -603,8 +603,8 @@ void Bind2Backend::loadConfig(string* status)
           L<<Logger::Info<<d_logprefix<<" parsing '"<<i->name<<"' from file '"<<i->filename<<"'"<<endl;
           DNSSECKeeper dk;
           NSEC3PARAMRecordContent ns3pr;
-          dk.getNSEC3PARAM(i->name, &ns3pr);
-          if(ns3pr.d_salt.empty())
+          bool nsec3zone=dk.getNSEC3PARAM(i->name, &ns3pr);
+          if(!nsec3zone)
             cerr<<"no nsec3 for "<<i->name<<endl;
           else
             cerr<<"NEED TO HASH "<<i->name<<endl;
@@ -617,7 +617,7 @@ void Bind2Backend::loadConfig(string* status)
             DNSResourceRecord rr;
             string hashed;
             while(zpt.get(rr)) {
-              if(!ns3pr.d_salt.empty())
+              if(nsec3zone)
                 hashed=toLower(toBase32Hex(hashQNameWithSalt(ns3pr.d_iterations, ns3pr.d_salt, rr.qname)));
               insert(staging, bbd->d_id, rr.qname, rr.qtype, rr.content, rr.ttl, rr.priority, hashed);
             }