]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Merge pull request #17197 from omoerbeek/rec-cachesize-neg-aggr
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 22 Apr 2026 19:03:52 +0000 (21:03 +0200)
committerGitHub <noreply@github.com>
Wed, 22 Apr 2026 19:03:52 +0000 (21:03 +0200)
rec: estimate size and refuse to cache big negcache entries

1  2 
pdns/recursordist/aggressive_nsec.cc
pdns/recursordist/aggressive_nsec.hh
pdns/recursordist/rec-main.cc
pdns/recursordist/test-aggressive_nsec_cc.cc

Simple merge
index c609d7c13d49e2e8a76bb56eaea50bb97de3f8e2,842015d0cff770b3f343ba3a520d86df360283ab..a017822017335ddfca23adea29463fd194244c9d
@@@ -125,18 -131,11 +126,20 @@@ private
        DNSName d_qname; // of the query data that lead to this entry being created/updated
        time_t d_ttd;
        QType d_qtype; // of the query data that lead to this entry being created/updated
+       [[nodiscard]] size_t sizeEstimate() const;
      };
  
 -    typedef multi_index_container<
 +    enum class ZoneDenialType : uint8_t
 +    {
 +      Unknown = 0,
 +      NSEC = 1,
 +      NSEC3 = 2
 +    };
 +
 +    static const std::string& getZoneTypeAsString(ZoneDenialType type);
 +
 +    using cache_t = multi_index_container<
        CacheEntry,
        indexed_by<
          ordered_unique<tag<OrderedTag>,
Simple merge