]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Check that cached data is flushed when NTA expires
authorAram Sargsyan <aram@isc.org>
Tue, 24 Feb 2026 17:24:38 +0000 (17:24 +0000)
committerOndřej Surý <ondrej@sury.org>
Wed, 18 Mar 2026 23:12:59 +0000 (00:12 +0100)
bin/tests/system/nta/tests_nta.py

index ece8db67295c963984da8a0d98996500823e0f9d..828c04822b6810c566fdcc1e78152d6ad028890a 100644 (file)
@@ -147,6 +147,13 @@ 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.