From: Remi Gacogne Date: Tue, 7 Jul 2020 07:56:41 +0000 (+0200) Subject: rec: Ignore cache-only for DSs retrieval X-Git-Tag: rec-4.3.3~1^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F9329%2Fhead;p=thirdparty%2Fpdns.git rec: Ignore cache-only for DSs retrieval 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) --- diff --git a/pdns/syncres.cc b/pdns/syncres.cc index 0121c05acf..34e8f68cbe 100644 --- a/pdns/syncres.cc +++ b/pdns/syncres.cc @@ -2052,8 +2052,10 @@ vState SyncRes::getDSRecords(const DNSName& zone, dsmap_t& ds, bool taOnly, unsi std::vector 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;