From: Ruben Kerkhof Date: Sat, 13 Dec 2014 21:14:42 +0000 (+0100) Subject: supermaster: check for missing ns records X-Git-Tag: rec-3.7.0-rc1~112^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=39b23e6927dc52d612da4be56c75c1276962dafe;p=pdns supermaster: check for missing ns records If the master has a SOA record for a domain but no NS records, we tried to look up the SOA record in the supermasters table. --- diff --git a/pdns/packethandler.cc b/pdns/packethandler.cc index dfa0bba2b..9152c087e 100644 --- a/pdns/packethandler.cc +++ b/pdns/packethandler.cc @@ -730,6 +730,18 @@ int PacketHandler::trySuperMasterSynchronous(DNSPacket *p) return RCode::ServFail; } + // check if the returned records are NS records + bool haveNS=false; + BOOST_FOREACH(const DNSResourceRecord& ns, nsset) { + if(ns.qtype.getCode()==QType::NS) + haveNS=true; + } + + if(!haveNS) { + L<qdomain<<" at: "<< p->getRemote()<getRemote(), p->qdomain, nsset, &nameserver, &account, &db)) {