]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Remove useless TTL override in rctx_referral() 12102/head
authorColin Vidal <colin@isc.org>
Fri, 29 May 2026 20:06:30 +0000 (22:06 +0200)
committerColin Vidal <colin@isc.org>
Wed, 1 Jul 2026 06:40:05 +0000 (08:40 +0200)
Function `rctx_referral()` used to force the TTL of an NS record with
TTL 0 to be 1.  This has now been removed, as the delegation database
already forces a minimum hard-coded TTL of 1 when the delegation has
a TTL of 0.

lib/dns/resolver.c

index 5dc634a010c94127fdb23aa16cb92fdeecc80043..d8ca636d67eca9d5282b41919caae10d06edf034 100644 (file)
@@ -9469,17 +9469,6 @@ rctx_referral(respctx_t *rctx) {
                return ISC_R_COMPLETE;
        }
 
-       /*
-        * NS rdatasets with 0 TTL cause problems.
-        * dns_view_findzonecut() will not find them when we
-        * try to follow the referral, and we'll SERVFAIL
-        * because the best nameservers are now above QDOMAIN.
-        * We force the TTL to 1 second to prevent this.
-        */
-       if (rctx->ns_rdataset->ttl == 0) {
-               rctx->ns_rdataset->ttl = 1;
-       }
-
        /*
         * An NS-based delegation can be cached immediately (i.e. there is no
         * DNSSEC validation).