]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Reinstate refresh && served-stale logic 12611/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Fri, 3 Mar 2023 11:08:35 +0000 (12:08 +0100)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Fri, 3 Mar 2023 11:08:35 +0000 (12:08 +0100)
pdns/recursordist/negcache.cc

index 0923b7de5a092bb732a7413e740c4c53408423cc..995104351a90df9f11a66932e41ac7db9563e6aa 100644 (file)
@@ -141,7 +141,8 @@ bool NegCache::get(const DNSName& qname, QType qtype, const struct timeval& now,
         // Not expired
         ne = *ni;
         moveCacheItemToBack<SequenceTag>(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);
       }
     }
   }