bind9/bin/tests
Tony Finch 4191fd01be Ensure that dns_request_createvia() has a retry limit
There are a couple of problems with dns_request_createvia(): a UDP
retry count of zero means unlimited retries (it should mean no
retries), and the overall request timeout is not enforced. The
combination of these bugs means that requests can be retried forever.

This change alters calls to dns_request_createvia() to avoid the
infinite retry bug by providing an explicit retry count. Previously,
the calls specified infinite retries and relied on the limit implied
by the overall request timeout and the UDP timeout (which did not work
because the overall timeout is not enforced). The `udpretries`
argument is also changed to be the number of retries; previously, zero
was interpreted as infinity because of an underflow to UINT_MAX, which
appeared to be a mistake. And `mdig` is updated to match the change in
retry accounting.

The bug could be triggered by zone maintenance queries, including
NOTIFY messages, DS parental checks, refresh SOA queries and stub zone
nameserver lookups. It could also occur with `nsupdate -r 0`.
(But `mdig` had its own code to avoid the bug.)

(cherry picked from commit 71ce8b0a51)
2022-04-06 18:17:55 +01:00
..
startperf Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
system Ensure that dns_request_createvia() has a retry limit 2022-04-06 18:17:55 +01:00
testdata/wire move all optional tests from bin/tests to bin/tests/optional 2018-03-09 14:12:47 -08:00
.gitignore Refactor TLSDNS module to work with libuv/ssl directly 2021-01-25 09:19:22 +01:00
Makefile.am Avoid using C99 variable length arrays 2022-03-18 16:05:56 +00:00
test_client.c Consistenly use UNREACHABLE() instead of ISC_UNREACHABLE() 2022-03-28 23:27:33 +02:00
test_server.c Consistenly use UNREACHABLE() instead of ISC_UNREACHABLE() 2022-03-28 23:27:33 +02:00
wire_test.c Remove UNREACHABLE() statements after exit() 2022-03-25 10:07:25 +01:00