From 3124eb052df3144f3b996e8367ed76bc23e927ac Mon Sep 17 00:00:00 2001 From: George Thessalonikefs Date: Tue, 26 Jan 2021 15:31:50 +0100 Subject: [PATCH] - Ignore cache blacklisting when trying to reply with expired data from cache. (#394) --- doc/Changelog | 2 ++ services/mesh.c | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/Changelog b/doc/Changelog index fed967d55..af53d7836 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -4,6 +4,8 @@ original instead of a decrementing TTL ('serve-original-ttl') - Merge PR #355 from noloader: Make ICANN Update CA and DS Trust Anchor static data. + - Ignore cache blacklisting when trying to reply with expired data from + cache (#394). 22 January 2022: Willem - Padding of queries and responses with DNS over TLS as specified in diff --git a/services/mesh.c b/services/mesh.c index 69f4d75e3..91d23debf 100644 --- a/services/mesh.c +++ b/services/mesh.c @@ -1929,7 +1929,9 @@ mesh_serve_expired_callback(void* arg) verbose(VERB_ALGO, "Serve expired: Trying to reply with expired data"); comm_timer_delete(qstate->serve_expired_data->timer); qstate->serve_expired_data->timer = NULL; - if(qstate->blacklist || qstate->no_cache_lookup || qstate->is_drop) { + /* If is_drop or no_cache_lookup (modules that handle their own cache e.g., + * subnetmod) ignore stale data from the main cache. */ + if(qstate->no_cache_lookup || qstate->is_drop) { verbose(VERB_ALGO, "Serve expired: Not allowed to look into cache for stale"); return; -- 2.47.2