]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Preserve ZEROTTL attribute when replacing NS RRset
authorOndřej Surý <ondrej@isc.org>
Tue, 26 Aug 2025 15:52:45 +0000 (17:52 +0200)
committerOndřej Surý <ondrej@isc.org>
Tue, 26 Aug 2025 16:26:34 +0000 (18:26 +0200)
Previously, BIND 9 would drop the ZEROTTL attribute when updating
previously cached NS entry with ZEROTTL attribute set.

Co-authored-by: Jinmei Tatuya <jtatuya@infoblox.com>
lib/dns/qpcache.c

index 6ced85532d6daf8ea525ec51f8c74cb475b8a721..ecb2b11eac1454481e54353a58d86c2ae751a66e 100644 (file)
@@ -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;
                        }
                }