]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Revert NTA flush on expire
authorAram Sargsyan <aram@isc.org>
Mon, 30 Mar 2026 12:11:46 +0000 (12:11 +0000)
committerArаm Sаrgsyаn <aram@isc.org>
Mon, 30 Mar 2026 18:27:35 +0000 (18:27 +0000)
Flushing the name when NTA expires causes problems for the ongoing
resolving process. Do not flush the name from the cache. Instead,
the resolver should do the flushing (this is planned to be merged
next).

bin/tests/system/nta/tests_nta.py
lib/dns/nta.c

index 828c04822b6810c566fdcc1e78152d6ad028890a..ece8db67295c963984da8a0d98996500823e0f9d 100644 (file)
@@ -147,13 +147,6 @@ def test_nta_behavior(servers):
     isctest.check.noerror(res)
     isctest.check.noadflag(res)
 
-    # Expiry should also trigger a cache flush, so even if a.secure.example A
-    # was cached when its NTA was active, cached data should not be returned.
-    m = isctest.query.create("a.secure.example", "A")
-    res = isctest.query.tcp(m, "10.53.0.4")
-    isctest.check.noerror(res)
-    isctest.check.adflag(res)
-
     # bogus.example was set to expire in 20s, so at t=13
     # it should still be NTA'd, but badds.example used the default
     # lifetime of 12s, so it should revert to SERVFAIL now.
index a1593120a978adcb32dbe0cb2be4c014cee0e90e..b56325acd51b466ce0be1f53be8d65849e0bce96 100644 (file)
@@ -414,7 +414,6 @@ dns_ntatable_covered(dns_ntatable_t *ntatable, isc_stdtime_t now,
        bool answer = false;
        dns_qpread_t qpr;
        void *pval = NULL;
-       bool flushnode = false;
 
        REQUIRE(VALID_NTATABLE(ntatable));
        REQUIRE(dns_name_isabsolute(name));
@@ -454,7 +453,6 @@ dns_ntatable_covered(dns_ntatable_t *ntatable, isc_stdtime_t now,
                /* NTA is expired */
                dns__nta_ref(nta);
                dns_ntatable_ref(nta->ntatable);
-               flushnode = true;
                isc_async_run(nta->loop, delete_expired, nta);
                goto done;
        }
@@ -462,10 +460,6 @@ dns_ntatable_covered(dns_ntatable_t *ntatable, isc_stdtime_t now,
        answer = true;
 done:
        dns_qpread_destroy(table, &qpr);
-
-       if (nta != NULL && flushnode) {
-               dns_view_flushnode(view, &nta->name, true);
-       }
 unlock:
        rcu_read_unlock();