From: Otto Date: Fri, 26 Mar 2021 15:30:01 +0000 (+0100) Subject: Review comments: clean d_from if needed and a merge oversight. X-Git-Tag: rec-4.4.3~4^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F10224%2Fhead;p=thirdparty%2Fpdns.git Review comments: clean d_from if needed and a merge oversight. --- diff --git a/pdns/recursor_cache.cc b/pdns/recursor_cache.cc index 8a798a60a1..94940c37b2 100644 --- a/pdns/recursor_cache.cc +++ b/pdns/recursor_cache.cc @@ -452,6 +452,8 @@ void MemRecursorCache::replace(time_t now, const DNSName &qname, const QType& qt ce.d_authZone = authZone; if (from) { ce.d_from = *from; + } else { + ce.d_from = ComboAddress(); } for (const auto& i : content) { diff --git a/pdns/reczones.cc b/pdns/reczones.cc index 992958b1d1..007543a2ca 100644 --- a/pdns/reczones.cc +++ b/pdns/reczones.cc @@ -69,13 +69,13 @@ bool primeHints(void) arr.d_content=std::make_shared(ComboAddress(rootIps4[c-'a'])); vector aset; aset.push_back(arr); - s_RC->replace(time(0), DNSName(templ), QType(QType::A), aset, vector>(), vector>(), true, g_rootdnsname, boost::none, boost::none, validationState); // auth, nuke it all + s_RC->replace(time(0), DNSName(templ), QType(QType::A), aset, vector>(), vector>(), true, g_rootdnsname, boost::none, boost::none, validationState, from); // auth, nuke it all if (rootIps6[c-'a'] != NULL) { aaaarr.d_content=std::make_shared(ComboAddress(rootIps6[c-'a'])); vector aaaaset; aaaaset.push_back(aaaarr); - s_RC->replace(time(0), DNSName(templ), QType(QType::AAAA), aaaaset, vector>(), vector>(), true, g_rootdnsname, boost::none, boost::none, validationState); + s_RC->replace(time(0), DNSName(templ), QType(QType::AAAA), aaaaset, vector>(), vector>(), true, g_rootdnsname, boost::none, boost::none, validationState, from); } nsset.push_back(nsrr); @@ -95,12 +95,12 @@ bool primeHints(void) seenA.insert(rr.qname); vector aset; aset.push_back(DNSRecord(rr)); - s_RC->replace(time(0), rr.qname, QType(QType::A), aset, vector>(), vector>(), true, g_rootdnsname, boost::none, boost::none, validationState); // auth, etc see above + s_RC->replace(time(0), rr.qname, QType(QType::A), aset, vector>(), vector>(), true, g_rootdnsname, boost::none, boost::none, validationState, from); // auth, etc see above } else if(rr.qtype.getCode()==QType::AAAA) { seenAAAA.insert(rr.qname); vector aaaaset; aaaaset.push_back(DNSRecord(rr)); - s_RC->replace(time(0), rr.qname, QType(QType::AAAA), aaaaset, vector>(), vector>(), true, g_rootdnsname, boost::none, boost::none, validationState); + s_RC->replace(time(0), rr.qname, QType(QType::AAAA), aaaaset, vector>(), vector>(), true, g_rootdnsname, boost::none, boost::none, validationState, from); } else if(rr.qtype.getCode()==QType::NS) { seenNS.insert(DNSName(rr.content)); rr.content=toLower(rr.content); @@ -136,7 +136,7 @@ bool primeHints(void) } s_RC->doWipeCache(g_rootdnsname, false, QType::NS); - s_RC->replace(time(0), g_rootdnsname, QType(QType::NS), nsset, vector>(), vector>(), false, g_rootdnsname, boost::none, boost::none, validationState); // and stuff in the cache + s_RC->replace(time(0), g_rootdnsname, QType(QType::NS), nsset, vector>(), vector>(), false, g_rootdnsname, boost::none, boost::none, validationState, from); // and stuff in the cache return true; }