]> git.ipfire.org Git - thirdparty/bind9.git/commit
Detect resolver fetch loops only when joining an in-flight fetch 12146/head
authorOndřej Surý <ondrej@isc.org>
Fri, 29 May 2026 14:36:45 +0000 (16:36 +0200)
committerOndřej Surý <ondrej@sury.org>
Fri, 29 May 2026 19:34:10 +0000 (21:34 +0200)
commitc479706872bba8b7d2a896ffc66036b7bad057a5
tree86e7928b90223bb0b6ad91a0b0ad359d2243c625
parent1efa52a3f030b8dde7f02baa366dbb173af512c6
Detect resolver fetch loops only when joining an in-flight fetch

dns_resolver_createfetch() guarded against fetch loops by comparing the
raw request name/type/domain before any fetch context existed. Move the
check after the context is obtained and run it against the context
itself, and only when we joined an already in-flight context
(!new_fctx) that is also an ancestor in the parent chain. That is the
real loop condition: the new fetch would block waiting on a fetch that
is itself waiting on us. A newly created context waits on nothing, so it
proceeds, bounded by the fetch depth limit and the complementary ADB
loop detection.

(cherry picked from commit 0e04671b6508f9ff3cec85114300c136888a3852)
lib/dns/resolver.c