]> git.ipfire.org Git - thirdparty/bind9.git/commit
DiG: use the same retry and fail-over logic for different failure types
authorAram Sargsyan <aram@isc.org>
Wed, 15 Jun 2022 13:41:10 +0000 (13:41 +0000)
committerAram Sargsyan <aram@isc.org>
Fri, 22 Jul 2022 08:35:35 +0000 (08:35 +0000)
commit8611aa759f7eb1fe4c439bfbbabc6b882e49e081
tree3c14617aef513fd6248dbec89b5764968d932469
parent99085c587e0cd235797f980810d32b9dcf960df2
DiG: use the same retry and fail-over logic for different failure types

DiG implements different logic in the `recv_done()` callback function
when processing a failure:

1. For a timed-out query it applies the "retries" logic first, then,
   when it fails, fail-overs to the next server.

2. For an EOF (end-of-file, or unexpected disconnect) error it tries to
   make a single retry attempt (even if the user has requested more
   retries), then, when it fails, fail-overs to the next server.

3. For other types of failures, DiG does not apply the "retries" logic,
   and tries to fail-over to the next servers (again, even if the user
   has requested to make retries).

Simplify the logic and apply the same logic (1) of first retries, and
then fail-over, for different types of failures in `recv_done()`.
bin/dig/dighost.c
bin/dig/dighost.h
bin/tests/system/acl/tests.sh
bin/tests/system/legacy/tests.sh
bin/tests/system/rpz/tests.sh
bin/tests/system/serve-stale/tests.sh