From: Ondřej Surý Date: Wed, 24 Jun 2026 05:13:16 +0000 (+0200) Subject: Mark the related slabheader as visited on cache hit X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=6e646e664a86e41165de428afd50575f7a166dfa;p=thirdparty%2Fbind9.git Mark the related slabheader as visited on cache hit A cache hit only marked the looked-up header as SIEVE-visited, leaving its related header (the flattened counterpart) a candidate for eviction. Mark both so related slabheaders age together. --- diff --git a/lib/dns/qpcache.c b/lib/dns/qpcache.c index 1a0d0f129d1..818b5632b4b 100644 --- a/lib/dns/qpcache.c +++ b/lib/dns/qpcache.c @@ -499,10 +499,10 @@ qpcache_miss(qpcache_t *qpdb, dns_slabheader_t *newheader, static void qpcache_hit(qpcache_t *qpdb ISC_ATTR_UNUSED, dns_slabheader_t *header) { - /* - * On cache hit, we only mark the header as seen. - */ ISC_SIEVE_MARK(header, visited); + if (header->related) { + ISC_SIEVE_MARK(header->related, visited); + } } /*