]> git.ipfire.org Git - thirdparty/bind9.git/commit
Reset DNS_DBFIND_STALETIMEOUT in query_lookup()
authorAram Sargsyan <aram@isc.org>
Wed, 18 Jun 2025 13:32:03 +0000 (13:32 +0000)
committerAndoni Duarte Pintado <andoni@isc.org>
Thu, 3 Jul 2025 09:03:34 +0000 (11:03 +0200)
commit3d8bd8bbf15322c0c317e76364b53ba7ea88def5
tree680c29e986e07666a33a72364d51b47813ea611d
parent3719cf53c0f56fd8daf7569a67270aa776109ebb
Reset DNS_DBFIND_STALETIMEOUT in query_lookup()

If ns__query_start() is called because of a chained query (e.g.
after encountering a CNAME), a previously set DNS_DBFIND_STALETIMEOUT
flag on the query's 'dboptions' field can cause an assertion
failure if the new query's 'stalefirst' value is not true (e.g. if the
target qname is an authoritative zone for the server). Reset the
DNS_DBFIND_STALETIMEOUT flag in the query_lookup() function before
evaluating the 'stalefirst' value, and make sure to assign a fresh
value to the `stalefirst' flag instead of conditionally assigning it
only if the value is 'true'.
lib/ns/query.c