From: Peter van Dijk Date: Thu, 22 Nov 2012 15:00:55 +0000 (+0000) Subject: ignore NSEC/NSEC3 records while loading bind zonefiles X-Git-Tag: auth-3.2-rc2~84 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c884525828916a98871a6c17567d24d12a265f2f;p=pdns ignore NSEC/NSEC3 records while loading bind zonefiles git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@2917 d19b8d6e-7fed-0310-83ef-9ca221ded41b --- diff --git a/pdns/backends/bind/bindbackend2.cc b/pdns/backends/bind/bindbackend2.cc index 3468c0abf..61009f7ad 100644 --- a/pdns/backends/bind/bindbackend2.cc +++ b/pdns/backends/bind/bindbackend2.cc @@ -735,7 +735,10 @@ void Bind2Backend::loadConfig(string* status) ZoneParserTNG zpt(i->filename, i->name, BP.getDirectory()); DNSResourceRecord rr; string hashed; - while(zpt.get(rr)) { + while(zpt.get(rr)) { // FIXME this code is duplicate + if(rr.qtype.getCode() == QType::NSEC || rr.qtype.getCode() == QType::NSEC3) + continue; // we synthesise NSECs on demand + if(nsec3zone) { if(rr.qtype.getCode() != QType::NSEC3 && rr.qtype.getCode() != QType::RRSIG) hashed=toLower(toBase32Hex(hashQNameWithSalt(ns3pr.d_iterations, ns3pr.d_salt, rr.qname))); @@ -864,6 +867,9 @@ void Bind2Backend::queueReload(BB2DomainInfo *bbd) NSEC3PARAMRecordContent ns3pr; bool nsec3zone=getNSEC3PARAM(bbd->d_name, &ns3pr); while(zpt.get(rr)) { + if(rr.qtype.getCode() == QType::NSEC || rr.qtype.getCode() == QType::NSEC3) + continue; // we synthesise NSECs on demand + if(nsec3zone) { if(rr.qtype.getCode() != QType::NSEC3 && rr.qtype.getCode() != QType::RRSIG) hashed=toLower(toBase32Hex(hashQNameWithSalt(ns3pr.d_iterations, ns3pr.d_salt, rr.qname)));