From: Ondřej Surý Date: Tue, 26 Aug 2025 15:52:45 +0000 (+0200) Subject: Preserve ZEROTTL attribute when replacing NS RRset X-Git-Tag: v9.21.12~22^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=982ca161c26c2e6cd90b19888331bb015dcbae1f;p=thirdparty%2Fbind9.git Preserve ZEROTTL attribute when replacing NS RRset Previously, BIND 9 would drop the ZEROTTL attribute when updating previously cached NS entry with ZEROTTL attribute set. Co-authored-by: Jinmei Tatuya --- diff --git a/lib/dns/qpcache.c b/lib/dns/qpcache.c index 6ced85532d6..ecb2b11eac1 100644 --- a/lib/dns/qpcache.c +++ b/lib/dns/qpcache.c @@ -2790,6 +2790,11 @@ find_header: header->trust <= newheader->trust) { if (newheader->expire > header->expire) { + if (ZEROTTL(header)) { + DNS_SLABHEADER_SETATTR( + newheader, + DNS_SLABHEADERATTR_ZEROTTL); + } newheader->expire = header->expire; } }