From 01e23732fcec98e9a66fb213c0ae262d132f0da3 Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Fri, 11 Oct 2019 14:52:08 +0200 Subject: [PATCH] dnsdist: Don't cache entries larger than 4096 bytes We won't be able to use them anyway. --- pdns/dnsdist.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.50.1