From: Ruben d'Arco Date: Thu, 9 May 2013 21:34:47 +0000 (+0200) Subject: Do not insert ENT when adding delegate X-Git-Tag: rec-3.6.0-rc1~556^2~3^2~41 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=163cb72643f8bddf93e06d56124b81b5521a2f77;p=thirdparty%2Fpdns.git Do not insert ENT when adding delegate --- diff --git a/pdns/rfc2136handler.cc b/pdns/rfc2136handler.cc index d5ee436261..e3b9fd875e 100755 --- a/pdns/rfc2136handler.cc +++ b/pdns/rfc2136handler.cc @@ -218,13 +218,14 @@ uint16_t PacketHandler::performUpdate(const string &msgPrefix, const DNSRecord * delnonterm.insert(rrLabel); // always remove any ENT's in the place where we're going to add a record. DNSResourceRecord newRec(*rr); newRec.domain_id = di->id; + newRec.auth = (rrType.getCode() != QType::NS); di->backend->feedRecord(newRec); changedRecords++; // because we added a record, we need to fix DNSSEC data. string shorter(rrLabel); - bool auth=true; + bool auth=newRec.auth; if (shorter != di->zone && rrType != QType::DS) { while(chopOff(shorter)) { @@ -234,10 +235,10 @@ uint16_t PacketHandler::performUpdate(const string &msgPrefix, const DNSRecord * di->backend->lookup(QType(QType::ANY), shorter); while (di->backend->get(rec)) { foundShorter = true; - if (rec.qtype == QType::NS) + if (rec.qtype == QType::NS) // are we inserting below a delegate? auth=false; } - if (!foundShorter) + if (!foundShorter) insnonterm.insert(shorter); else break; // if we find a shorter record, we can stop searching @@ -273,6 +274,7 @@ uint16_t PacketHandler::performUpdate(const string &msgPrefix, const DNSRecord * // Auth can only be false when the rrLabel is not the zone if (auth == false && rrType == QType::NS) { DLOG(L< qnames; di->backend->listSubZone(rrLabel, di->id); while(di->backend->get(rec)) {