Permalink
Browse files

Cache records for zones that were delegated to from a forwarded zone

Fixes #4483
  • Loading branch information...
1 parent 9e7120f commit 46ccbd6ab762a4941600eb6d5a6bc42091240edd @pieterlexis pieterlexis committed Sep 30, 2016
Showing with 2 additions and 1 deletion.
  1. +2 −1 pdns/syncres.cc
View
@@ -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;

0 comments on commit 46ccbd6

Please sign in to comment.