]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Do not test the individual records' ttls, they should be consistent with the ttl
authorOtto <otto.moerbeek@open-xchange.com>
Fri, 9 Apr 2021 09:50:29 +0000 (11:50 +0200)
committerOtto <otto.moerbeek@open-xchange.com>
Fri, 9 Apr 2021 09:50:29 +0000 (11:50 +0200)
of the cache entry itself.

pdns/syncres.cc

index 87329f9ac9c06403fd65429787ada70c4a24ff2b..b822efc648e2988a9ecdd9812caeebf60c6c2bdf 100644 (file)
@@ -1078,19 +1078,15 @@ vector<ComboAddress> 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<ARecordContent>(i)) {
-            ret.push_back(rec->getCA(53));
-          }
+        if (auto rec = getRR<ARecordContent>(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<AAAARecordContent>(i)) {
-            ret.push_back(rec->getCA(53));
-          }
+        if (auto rec = getRR<AAAARecordContent>(i)) {
+          ret.push_back(rec->getCA(53));
         }
       }
     }