From: Otto Moerbeek Date: Fri, 3 Mar 2023 11:08:35 +0000 (+0100) Subject: Reinstate refresh && served-stale logic X-Git-Tag: dnsdist-1.8.0-rc2~3^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F12611%2Fhead;p=thirdparty%2Fpdns.git Reinstate refresh && served-stale logic --- 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); } } }