From c5b312274dd8af7ee0156ddf7a86062b2d67fcea Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Fri, 3 Mar 2023 12:08:35 +0100 Subject: [PATCH] Reinstate refresh && served-stale logic --- pdns/recursordist/negcache.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pdns/recursordist/negcache.cc b/pdns/recursordist/negcache.cc index 0923b7de5a..995104351a 100644 --- a/pdns/recursordist/negcache.cc +++ b/pdns/recursordist/negcache.cc @@ -141,7 +141,8 @@ bool NegCache::get(const DNSName& qname, QType qtype, const struct timeval& now, // Not expired ne = *ni; moveCacheItemToBack(content->d_map, firstIndexIterator); - return !refresh; // when refreshing, we consider everything outdated + // when refreshing, we consider served-stale entries outdated + return !(refresh && ni->d_servedStale > 0); } } } -- 2.47.2