]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
rec: Ignore cache-only for DSs retrieval 9297/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 7 Jul 2020 07:56:41 +0000 (09:56 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 7 Jul 2020 07:56:41 +0000 (09:56 +0200)
When the DSs are needed for validation, the initial RD flag should
not prevent us from going to the network.

pdns/syncres.cc

index 820efea01b9491f7ed6d5284285c7a1612bf7342..a96fdf620e90647aeed7ee0abd3751645c5b88f0 100644 (file)
@@ -2062,7 +2062,9 @@ 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);
+  setCacheOnly(oldCacheOnly);
 
   if (rcode == RCode::NoError || (rcode == RCode::NXDomain && !bogusOnNXD)) {
     uint8_t bestDigestType = 0;