From: Pieter Lexis Date: Mon, 13 Jul 2015 12:09:44 +0000 (+0200) Subject: Add code accidently removed in 0ad83dabffa6b0b44d298adfa3055b1eed7e0b03 X-Git-Tag: dnsdist-1.0.0-alpha1~248^2~57^2~3^2~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=58889ee651b4db8c6b38d93ffadf07d31a5876d0;p=thirdparty%2Fpdns.git Add code accidently removed in 0ad83dabffa6b0b44d298adfa3055b1eed7e0b03 --- diff --git a/pdns/syncres.cc b/pdns/syncres.cc index 0b0f994d7a..d51e4c7387 100644 --- a/pdns/syncres.cc +++ b/pdns/syncres.cc @@ -1072,6 +1072,22 @@ int SyncRes::doResolveAt(set nameservers, DNSName auth, bool flawedNSSe continue; } + // Check if we are authoritative for a zone in this answer + if (!t_sstorage->domainmap->empty()) { + DNSName tmp_qname(i->qname); + auto auth_domain_iter=getBestAuthZone(&tmp_qname); + if(auth_domain_iter!=t_sstorage->domainmap->end()) { + if (auth_domain_iter->first != auth) { + LOG("NO! - we are authoritative for the zone "<first.toString()<qname.isPartOf(auth)) { if(lwr.d_aabit && lwr.d_rcode==RCode::NoError && i->d_place==DNSResourceRecord::ANSWER && ::arg().contains("delegation-only",auth.toString() /* ugh */)) { LOG("NO! Is from delegation-only zone"<