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: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=01e23732fcec98e9a66fb213c0ae262d132f0da3;p=pdns 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 4b826767c..08d5ceeb2 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