]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Hardcode "max-cache-size" for the "_bind" view
authorMichał Kępień <michal@isc.org>
Tue, 22 Jun 2021 13:28:31 +0000 (15:28 +0200)
committerMichał Kępień <michal@isc.org>
Tue, 22 Jun 2021 13:28:31 +0000 (15:28 +0200)
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

index 7e4757a4fe95dd587ea589ba5fbe0efb23ee5476..10087b47f3a912d7716d397b2037f5de30d71449 100644 (file)
@@ -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\