From: George Thessalonikefs Date: Wed, 30 Nov 2022 13:45:36 +0000 (+0100) Subject: - Clear documentation for interactivity between the subnet module and X-Git-Tag: release-1.17.1rc1~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d7a9def160ea0474ba53aaac1c66a62fc3de4893;p=thirdparty%2Funbound.git - Clear documentation for interactivity between the subnet module and the serve-expired and prefetch configuration options. --- diff --git a/doc/Changelog b/doc/Changelog index 3409a2d59..4d948f53a 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,5 +1,7 @@ 30 November 2022: George - Add SVCB and HTTPS to the types removed by 'unbound-control flush'. + - Clear documentation for interactivity between the subnet module and + the serve-expired and prefetch configuration options. 30 November 2022: Wouter - Fix #782: Segmentation fault in stats.c:404. diff --git a/doc/unbound.conf.5.in b/doc/unbound.conf.5.in index d829008a7..13e08be20 100644 --- a/doc/unbound.conf.5.in +++ b/doc/unbound.conf.5.in @@ -2358,6 +2358,9 @@ The maximum size of the ECS cache is controlled by 'msg-cache-size' in the configuration file. On top of that, for each query only 100 different subnets are allowed to be stored for each address family. Exceeding that number, older entries will be purged from cache. +.LP +This module does not interact with the \fBserve\-expired*\fR and +\fBprefetch:\fR options. .TP .B send\-client\-subnet: \fI\fR Send client source address to this authority. Append /num to indicate a diff --git a/edns-subnet/subnetmod.c b/edns-subnet/subnetmod.c index 0f1df417f..458a89702 100644 --- a/edns-subnet/subnetmod.c +++ b/edns-subnet/subnetmod.c @@ -204,6 +204,17 @@ subnetmod_init(struct module_env *env, int id) } alloc_init(&sn_env->alloc, NULL, 0); env->modinfo[id] = (void*)sn_env; + + /* Warn that serve-expired and prefetch do not work with the subnet + * module cache. */ + if(env->cfg->serve_expired) + log_warn( + "subnetcache: serve-expired is set but not working " + "for data originating from the subnet module cache."); + if(env->cfg->prefetch) + log_warn( + "subnetcache: prefetch is set but not working " + "for data originating from the subnet module cache."); /* Copy msg_cache settings */ sn_env->subnet_msg_cache = slabhash_create(env->cfg->msg_cache_slabs, HASH_DEFAULT_STARTARRAY, env->cfg->msg_cache_size,