]> granicus.if.org Git - pdns/commitdiff
make sure we can resolve 'x.com' if we have auth NS records loaded for x.com
authorbert hubert <bert.hubert@netherlabs.nl>
Sun, 5 Jun 2016 19:13:10 +0000 (21:13 +0200)
committerbert hubert <bert.hubert@netherlabs.nl>
Sun, 5 Jun 2016 19:13:10 +0000 (21:13 +0200)
pdns/syncres.cc

index cf51b3f31ca471b0dab4c6a94a6b327ca7a96c26..9b8a02727c7d93702503546de6391d1c06dd7414 100644 (file)
@@ -207,6 +207,11 @@ bool SyncRes::doOOBResolve(const DNSName &qname, const QType &qtype, vector<DNSR
     somedata=true;
     if(qtype.getCode()==QType::ANY || ziter->d_type==qtype.getCode() || ziter->d_type==QType::CNAME)  // let rest of nameserver do the legwork on this one
       ret.push_back(*ziter);
+    else if(ziter->d_type == QType::NS) { // we hit a delegation point!
+      DNSRecord dr=*ziter;
+      dr.d_place=DNSResourceRecord::AUTHORITY;
+      ret.push_back(dr);
+    }
   }
   if(!ret.empty()) {
     LOG(prefix<<qname.toString()<<": exact match in zone '"<<authdomain.toString()<<"'"<<endl);