]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
rec: Compute the zone cuts before trying to validate a cached entry 5463/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 26 Jun 2017 15:17:08 +0000 (17:17 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 26 Jun 2017 15:17:08 +0000 (17:17 +0200)
pdns/syncres.cc

index 8dd6d0dfd3894e0e3ce6683f8d27f89810098393..95123efddc2138e63c33046fa481c74dcbe2fb10 100644 (file)
@@ -823,6 +823,9 @@ bool SyncRes::doCNAMECacheCheck(const DNSName &qname, const QType &qtype, vector
         if (validationEnabled() && wasAuth && state == Indeterminate && d_requireAuthData) {
           /* This means we couldn't figure out the state when this entry was cached,
              most likely because we hadn't computed the zone cuts yet. */
+          /* make sure they are computed before validating */
+          computeZoneCuts(qname, g_rootdnsname, depth);
+
           vState recordState = getValidationStatus(qname);
           if (recordState == Secure) {
             LOG(prefix<<qname<<": got Indeterminate state from the CNAME cache, validating.."<<endl);
@@ -977,6 +980,9 @@ bool SyncRes::doCacheCheck(const DNSName &qname, const QType &qtype, vector<DNSR
 
       /* This means we couldn't figure out the state when this entry was cached,
          most likely because we hadn't computed the zone cuts yet. */
+      /* make sure they are computed before validating */
+      computeZoneCuts(sqname, g_rootdnsname, depth);
+
       vState recordState = getValidationStatus(qname);
       if (recordState == Secure) {
         LOG(prefix<<sqname<<": got Indeterminate state from the cache, validating.."<<endl);