From: Pieter Lexis Date: Fri, 30 Sep 2016 11:18:43 +0000 (+0200) Subject: Cache records for zones that were delegated to from a forwarded zone X-Git-Tag: dnsdist-1.1.0-beta2~78^2~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0af9c73deeb7e34334ffa5162d23fce7f6f0c1c4;p=pdns Cache records for zones that were delegated to from a forwarded zone Fixes #4483 --- diff --git a/pdns/syncres.cc b/pdns/syncres.cc index 44e033249..eb992c739 100644 --- a/pdns/syncres.cc +++ b/pdns/syncres.cc @@ -1245,7 +1245,8 @@ int SyncRes::doResolveAt(NsSet &nameservers, DNSName auth, bool flawedNSSet, con // Check if we are authoritative for a zone in this answer DNSName tmp_qname(rec.d_name); auto auth_domain_iter=getBestAuthZone(&tmp_qname); - if(auth_domain_iter!=t_sstorage->domainmap->end()) { + if(auth_domain_iter!=t_sstorage->domainmap->end() && + auth.countLabels() <= auth_domain_iter->first.countLabels()) { if (auth_domain_iter->first != auth) { LOG("NO! - we are authoritative for the zone "<first<