From: Robin Geuze Date: Tue, 29 Jun 2021 12:37:31 +0000 (+0200) Subject: Fix it so addCache actually picks the minimal ttl rather than the last one < d_cache_ttl X-Git-Tag: dnsdist-1.7.0-alpha1~111^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f5089f3a3598a27fe0be5695554c14a4f6a45c93;p=thirdparty%2Fpdns.git Fix it so addCache actually picks the minimal ttl rather than the last one < d_cache_ttl --- diff --git a/pdns/ueberbackend.cc b/pdns/ueberbackend.cc index 65ea675c5f..6f4452d432 100644 --- a/pdns/ueberbackend.cc +++ b/pdns/ueberbackend.cc @@ -590,7 +590,7 @@ void UeberBackend::addCache(const Question &q, vector &&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;