]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Mark the related slabheader as visited on cache hit 12306/head
authorOndřej Surý <ondrej@sury.org>
Wed, 24 Jun 2026 05:13:16 +0000 (07:13 +0200)
committerOndřej Surý <ondrej@isc.org>
Tue, 7 Jul 2026 14:28:14 +0000 (16:28 +0200)
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.

lib/dns/qpcache.c

index 1a0d0f129d1562ed9c9108cde1e9fc81e13e7486..818b5632b4b7d1ac5ade856c0bda15f4e8f494da 100644 (file)
@@ -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);
+       }
 }
 
 /*