]> git.ipfire.org Git - thirdparty/bind9.git/commit
Reset DNS_{GETDB_STALEFIRST,DBFIND_STALETIMEOUT} in ns__query_start()
authorAram Sargsyan <aram@isc.org>
Thu, 26 Jun 2025 13:50:25 +0000 (13:50 +0000)
committerMichał Kępień <michal@isc.org>
Thu, 3 Jul 2025 12:24:55 +0000 (14:24 +0200)
commit65ba05bb68cab20088cc0b9f378c3e055b2c11db
treec283c2c608e26b42e476e562b91e4ea92e896ad3
parent0be568f921df509dd0a580f16b004214dc513b7a
Reset DNS_{GETDB_STALEFIRST,DBFIND_STALETIMEOUT} in ns__query_start()

In case of chained queries (e.g. CNAME) a discrepancy could arise
if the original query had the DNS_GETDB_STALEFIRST bit set, but
the next query doesn't have it (e.g. because the CNAME target is
a authoritative zone for the server) and cause an unanswered query
because of a logic error.

Reset both DNS_GETDB_STALEFIRST and DNS_DBFIND_STALETIMEOUT bits in
the ns__query_start() function before reevaluating whether they are
needed for the current query, and reset them again after calling
the query_lookup() function.
lib/ns/query.c