]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Fix it so addCache actually picks the minimal ttl rather than the last one < d_cache_ttl
authorRobin Geuze <robing@transip.nl>
Tue, 29 Jun 2021 12:37:31 +0000 (14:37 +0200)
committerRobin Geuze <robing@transip.nl>
Tue, 29 Jun 2021 12:37:31 +0000 (14:37 +0200)
pdns/ueberbackend.cc

index 65ea675c5fec226c10eea2f629afbb553b06969f..6f4452d43246877716867db36cdf06d535132a48 100644 (file)
@@ -590,7 +590,7 @@ void UeberBackend::addCache(const Question &q, vector<DNSZoneRecord> &&rrs)
 
   unsigned int store_ttl = d_cache_ttl;
   for(const auto& rr : rrs) {
-   if (rr.dr.d_ttl < d_cache_ttl)
+   if (rr.dr.d_ttl < store_ttl)
      store_ttl = rr.dr.d_ttl;
    if (rr.scopeMask)
      return;