]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
rec: Ignore cache-only for DSs retrieval 9329/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 7 Jul 2020 07:56:41 +0000 (09:56 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 13 Jul 2020 14:24:35 +0000 (16:24 +0200)
When the DSs are needed for validation, the initial RD flag should
not prevent us from going to the network.

(cherry picked from commit 68536f5ba1b37b1ab6008ab8842a4eeb676cc3e4)

pdns/syncres.cc

index 0121c05acf7e59a6961b336dd28d636dc5d50097..34e8f68cbef7ea813124894cd90ef8499f08c624 100644 (file)
@@ -2052,8 +2052,10 @@ vState SyncRes::getDSRecords(const DNSName& zone, dsmap_t& ds, bool taOnly, unsi
   std::vector<DNSRecord> dsrecords;
 
   vState state = Indeterminate;
+  const bool oldCacheOnly = setCacheOnly(false);
   int rcode = doResolve(zone, QType(QType::DS), dsrecords, depth + 1, beenthere, state);
   d_skipCNAMECheck = oldSkipCNAME;
+  setCacheOnly(oldCacheOnly);
 
   if (rcode == RCode::NoError || (rcode == RCode::NXDomain && !bogusOnNXD)) {
     uint8_t bestDigestType = 0;