From 163cb72643f8bddf93e06d56124b81b5521a2f77 Mon Sep 17 00:00:00 2001 From: Ruben d'Arco Date: Thu, 9 May 2013 23:34:47 +0200 Subject: [PATCH] Do not insert ENT when adding delegate --- pdns/rfc2136handler.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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)) { -- 2.47.3