From: Remi Gacogne Date: Fri, 11 Oct 2019 12:52:08 +0000 (+0200) Subject: dnsdist: Don't cache entries larger than 4096 bytes X-Git-Tag: dnsdist-1.4.0-rc4~22^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=01e23732fcec98e9a66fb213c0ae262d132f0da3;p=thirdparty%2Fpdns.git dnsdist: Don't cache entries larger than 4096 bytes We won't be able to use them anyway. --- diff --git a/pdns/dnsdist.cc b/pdns/dnsdist.cc index 4b826767c3..08d5ceeb28 100644 --- a/pdns/dnsdist.cc +++ b/pdns/dnsdist.cc @@ -439,7 +439,7 @@ bool processResponse(char** response, uint16_t* responseLen, size_t* responseSiz return false; } - if (dr.packetCache && !dr.skipCache) { + if (dr.packetCache && !dr.skipCache && *responseLen <= s_maxPacketCacheEntrySize) { if (!dr.useZeroScope) { /* if the query was not suitable for zero-scope, for example because it had an existing ECS entry so the hash is