From: Remi Gacogne Date: Tue, 11 Apr 2017 09:18:59 +0000 (+0200) Subject: rec: Get rid of `SyncRes::d_nocache`, prevent root refresh loop X-Git-Tag: rec-4.1.0-alpha1~107^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0b29b9c50b68efedd28c96b430e7fe90c86234a8;p=thirdparty%2Fpdns.git rec: Get rid of `SyncRes::d_nocache`, prevent root refresh loop `SyncRes::d_nocache` did not really prevent looking at the cache or the local zones, and was only used when we refresh the root NS. --- diff --git a/pdns/syncres.cc b/pdns/syncres.cc index 9aa7cb60e3..e43c91525b 100644 --- a/pdns/syncres.cc +++ b/pdns/syncres.cc @@ -103,7 +103,7 @@ static void accountAuthLatency(int usec, int family) SyncRes::SyncRes(const struct timeval& now) : d_outqueries(0), d_tcpoutqueries(0), d_throttledqueries(0), d_timeouts(0), d_unreachables(0), d_totUsec(0), d_now(now), - d_cacheonly(false), d_nocache(false), d_doDNSSEC(false), d_doEDNS0(false), d_lm(s_lm) + d_cacheonly(false), d_doDNSSEC(false), d_doEDNS0(false), d_lm(s_lm) { } @@ -479,7 +479,7 @@ int SyncRes::doResolve(const DNSName &qname, const QType &qtype, vector getEDNSSubnetMask(const ComboAddress& local, const DNSName&dn, const ComboAddress& rem); + void setUpdatingRootNS() + { + d_updatingRootNS = true; + } + + ostringstream d_trace; shared_ptr d_pdl; boost::optional d_incomingECS; @@ -719,14 +721,11 @@ private: * This is set when the RD bit is unset in the incoming query */ bool d_cacheonly; - /* d_nocache is *only* set in getRootNS() (in pdns_recursor.cc). - * It forces us to not look in the cache or local auth. - */ - bool d_nocache; bool d_doDNSSEC; bool d_doEDNS0{true}; bool d_incomingECSFound{false}; bool d_skipCNAMECheck{false}; + bool d_updatingRootNS{false}; bool d_wantsRPZ{true}; bool d_wasOutOfBand{false}; bool d_wasVariable{false};