From: Otto Date: Fri, 9 Apr 2021 09:50:29 +0000 (+0200) Subject: Do not test the individual records' ttls, they should be consistent with the ttl X-Git-Tag: dnsdist-1.6.0-rc1~12^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c83dc46118bca2913baaa2f76dd422ac195b3b14;p=thirdparty%2Fpdns.git Do not test the individual records' ttls, they should be consistent with the ttl of the cache entry itself. --- diff --git a/pdns/syncres.cc b/pdns/syncres.cc index 87329f9ac9..b822efc648 100644 --- a/pdns/syncres.cc +++ b/pdns/syncres.cc @@ -1078,19 +1078,15 @@ vector SyncRes::getAddrs(const DNSName &qname, unsigned int depth, res_t cset; if (s_doIPv4 && g_recCache->get(d_now.tv_sec, qname, QType::A, false, &cset, d_cacheRemote, d_refresh, d_routingTag) > 0) { for (const auto &i : cset) { - if (i.d_ttl > (unsigned int)d_now.tv_sec ) { - if (auto rec = getRR(i)) { - ret.push_back(rec->getCA(53)); - } + if (auto rec = getRR(i)) { + ret.push_back(rec->getCA(53)); } } } if (s_doIPv6 && g_recCache->get(d_now.tv_sec, qname, QType::AAAA, false, &cset, d_cacheRemote, d_refresh, d_routingTag) > 0) { for (const auto &i : cset) { - if (i.d_ttl > (unsigned int)d_now.tv_sec ) { - if (auto rec = getRR(i)) { - ret.push_back(rec->getCA(53)); - } + if (auto rec = getRR(i)) { + ret.push_back(rec->getCA(53)); } } }