From 982ca161c26c2e6cd90b19888331bb015dcbae1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Tue, 26 Aug 2025 17:52:45 +0200 Subject: [PATCH] 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 --- lib/dns/qpcache.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/dns/qpcache.c b/lib/dns/qpcache.c index 6ced85532d..ecb2b11eac 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; } }