]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Update outdated comment, as suggested by Miod (thanks!) 15423/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 11 Apr 2025 13:48:27 +0000 (15:48 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 11 Apr 2025 13:48:27 +0000 (15:48 +0200)
pdns/dnsdistdist/dnsdist-cache.cc

index 6aeee8a3ab0bf0ab84dfe6b51e67d536cffe7b66..6d9e1fc3e1da4cc5649571ac973a5029ce738dd0 100644 (file)
@@ -149,8 +149,10 @@ void DNSDistPacketCache::insert(uint32_t key, const boost::optional<Netmask>& su
     // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     minTTL = getMinTTL(reinterpret_cast<const char*>(response.data()), response.size(), &seenAuthSOA);
 
-    /* no TTL found, we don't want to cache this */
     if (minTTL == std::numeric_limits<uint32_t>::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;
       }