From: Michał Kępień Date: Tue, 22 Jun 2021 13:28:31 +0000 (+0200) Subject: Hardcode "max-cache-size" for the "_bind" view X-Git-Tag: v9.17.16~26^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=86698ded32515710b5b8734b4ed8ac4d2be62b60;p=thirdparty%2Fbind9.git 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. --- diff --git a/bin/named/config.c b/bin/named/config.c index 7e4757a4fe9..10087b47f3a 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\