]> git.ipfire.org Git - thirdparty/bind9.git/commit
rctx_resend() increment query counters
authorColin Vidal <colin@isc.org>
Tue, 7 Apr 2026 20:18:58 +0000 (22:18 +0200)
committerColin Vidal <colin@isc.org>
Thu, 30 Apr 2026 14:23:23 +0000 (16:23 +0200)
commiteb73df0cebc8909a030a0db66d4366e2181bd3f5
tree3ae7fa0d38a93209c7780c2eb51288509cdad0e2
parentc78042a013c04bd5db894543a6a02a7ed59e44c4
rctx_resend() increment query counters

Calls to `rctx_resend()` are done internally within the resolver, in
flow which are not supposed to happens more than once. For instance,
if some query fails, and a specific flag "F" wasn't set, then set the
flag and try again. This wouldn't occur more than once because if the
query fails the next attempt, the flag "F" would be set already, so the
resolver would move to the next server (or give up).

However, a subtle bug missing checking a flag, for instance, could lead
to an unbounded loop re-trying to query the same server. This is now
impossible as `rctx_resend()` also increment the query counters (so if
such case occurs, it would stop once the maximum limit is reached).

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