]> git.ipfire.org Git - thirdparty/bind9.git/commit
Fix cache flush ordering on NTA expiry
authorOndřej Surý <ondrej@isc.org>
Fri, 20 Mar 2026 13:29:57 +0000 (14:29 +0100)
committerOndřej Surý <ondrej@isc.org>
Fri, 20 Mar 2026 13:35:11 +0000 (14:35 +0100)
commitda8e1c956a9ae9134b2df511f0eba8efcceb77c7
treeef78a6f5bf292a04e9cb04175aace4641c5bd42d
parent892f50712df162a9bbc739378de9feec7c30ac65
Fix cache flush ordering on NTA expiry

dns_view_flushnode() was called in the delete_expired() async
callback, which runs after the query that detected the NTA expiry.
This created a race: the query would proceed with stale cached data
from the NTA period before the flush had a chance to run, resulting
in transient SERVFAIL with EDE 22 (No Reachable Authority).

Move dns_view_flushnode() into dns_ntatable_covered() so the cache
is flushed synchronously when the expiry is detected, before the
query continues.

Also simplify the expiry comparison in delete_expired() to a direct
pointer comparison (nta == pval) instead of comparing expiry
timestamps.
lib/dns/nta.c