From: Kees Monshouwer Date: Sun, 4 Jun 2017 12:18:38 +0000 (+0200) Subject: auth: some small rectify improvements X-Git-Tag: auth-4.0.4-rc1^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0bdeb138917505c3d4caf4f9317fd29836c54d0c;p=thirdparty%2Fpdns.git auth: some small rectify improvements --- diff --git a/pdns/pdnsutil.cc b/pdns/pdnsutil.cc index 50e30fe10d..d310ecc4c6 100644 --- a/pdns/pdnsutil.cc +++ b/pdns/pdnsutil.cc @@ -161,7 +161,6 @@ bool rectifyZone(DNSSECKeeper& dk, const DNSName& zone) DNSResourceRecord rr; set qnames, nsset, dsnames, insnonterm, delnonterm; map nonterm; - bool doent=true; vector rrs; while(sd.db->get(rr)) { @@ -176,8 +175,7 @@ bool rectifyZone(DNSSECKeeper& dk, const DNSName& zone) dsnames.insert(rr.qname); } else - if(doent) - delnonterm.insert(rr.qname); + delnonterm.insert(rr.qname); } NSEC3PARAMRecordContent ns3pr; @@ -228,6 +226,7 @@ bool rectifyZone(DNSSECKeeper& dk, const DNSName& zone) sd.db->startTransaction(zone, -1); bool realrr=true; + bool doent=true; uint32_t maxent = ::arg().asNum("max-ent-entries"); dononterm:; diff --git a/pdns/tcpreceiver.cc b/pdns/tcpreceiver.cc index 34339835fc..31c4d0b7b6 100644 --- a/pdns/tcpreceiver.cc +++ b/pdns/tcpreceiver.cc @@ -801,10 +801,10 @@ int TCPNameserver::doAXFR(const DNSName &target, shared_ptr q, int ou DNSName shorter(rr.qname); do { if (shorter==target) // apex is always auth - continue; + break; if(nsset.count(shorter) && !(rr.qname==shorter && rr.qtype.getCode() == QType::DS)) { rr.auth=false; - continue; + break; } } while(shorter.chopOff()); }