]> 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 09:00:21 +0000 (09:00 +0000)
commit29057d9911ec3db8affb666edaf86e5fc4aa75c3
tree2822442b5ed68b6cb377977b9e20aa480bd35a9a
parent6efb73d4bbceba38443a92daa6d0e84193a634db
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()`.

(cherry picked from commit abfd0d363f4f495de00dc4bd41f74726370369ba)
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