From: Remi Gacogne Date: Fri, 11 Apr 2025 13:48:27 +0000 (+0200) Subject: dnsdist: Update outdated comment, as suggested by Miod (thanks!) X-Git-Tag: dnsdist-2.0.0-alpha2~83^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F15423%2Fhead;p=thirdparty%2Fpdns.git dnsdist: Update outdated comment, as suggested by Miod (thanks!) --- diff --git a/pdns/dnsdistdist/dnsdist-cache.cc b/pdns/dnsdistdist/dnsdist-cache.cc index 6aeee8a3ab..6d9e1fc3e1 100644 --- a/pdns/dnsdistdist/dnsdist-cache.cc +++ b/pdns/dnsdistdist/dnsdist-cache.cc @@ -149,8 +149,10 @@ void DNSDistPacketCache::insert(uint32_t key, const boost::optional& su // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast) minTTL = getMinTTL(reinterpret_cast(response.data()), response.size(), &seenAuthSOA); - /* no TTL found, we don't want to cache this */ if (minTTL == std::numeric_limits::max()) { + /* no TTL found, we probably don't want to cache this + unless it's an empty (no records) truncated answer, + and we have been asked to cache these */ if (d_settings.d_truncatedTTL == 0) { return; }