From 86698ded32515710b5b8734b4ed8ac4d2be62b60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20K=C4=99pie=C5=84?= Date: Tue, 22 Jun 2021 15:28:31 +0200 Subject: [PATCH] Hardcode "max-cache-size" for the "_bind" view The built-in "_bind" view does not allow recursion and therefore does not need a large cache database. However, as "max-cache-size" is not explicitly set for that view in the default configuration, it inherits that setting from global options. Set "max-cache-size" for the built-in "_bind" view to a fixed value (2 MB, i.e. the smallest allowed value) to prevent needlessly preallocating memory for its cache RBT hash table. --- bin/named/config.c | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/named/config.c b/bin/named/config.c index 7e4757a4fe..10087b47f3 100644 --- a/bin/named/config.c +++ b/bin/named/config.c @@ -263,6 +263,7 @@ view \"_bind\" chaos {\n\ recursion no;\n\ notify no;\n\ allow-new-zones no;\n\ + max-cache-size 2M;\n\ \n\ # Prevent use of this zone in DNS amplified reflection DoS attacks\n\ rate-limit {\n\