]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Cache records for zones that were delegated to from a forwarded zone
authorPieter Lexis <pieter.lexis@powerdns.com>
Fri, 30 Sep 2016 11:18:43 +0000 (13:18 +0200)
committerPieter Lexis <pieter.lexis@powerdns.com>
Thu, 20 Oct 2016 12:00:42 +0000 (14:00 +0200)
Fixes #4483

pdns/syncres.cc

index 2894f1701dd995280b10cf6b3932060ea2139c5c..a07145213dcad6b44644c4b451d3464960877a06 100644 (file)
@@ -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 "<<auth_domain_iter->first<<endl);
                   continue;