]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Completely remove lowering the TTL, just use d_cache_ttl 10535/head
authorRobin Geuze <robing@transip.nl>
Tue, 29 Jun 2021 12:57:30 +0000 (14:57 +0200)
committerRobin Geuze <robing@transip.nl>
Tue, 29 Jun 2021 12:57:30 +0000 (14:57 +0200)
pdns/ueberbackend.cc

index 6f4452d43246877716867db36cdf06d535132a48..18296cd7e2397278da423b978ba7668304216b6a 100644 (file)
@@ -588,15 +588,12 @@ void UeberBackend::addCache(const Question &q, vector<DNSZoneRecord> &&rrs)
   if(!d_cache_ttl)
     return;
 
-  unsigned int store_ttl = d_cache_ttl;
   for(const auto& rr : rrs) {
-   if (rr.dr.d_ttl < store_ttl)
-     store_ttl = rr.dr.d_ttl;
    if (rr.scopeMask)
      return;
   }
 
-  QC.insert(q.qname, q.qtype, std::move(rrs), store_ttl, q.zoneId);
+  QC.insert(q.qname, q.qtype, std::move(rrs), d_cache_ttl, q.zoneId);
 }
 
 void UeberBackend::alsoNotifies(const DNSName &domain, set<string> *ips)