bind9/bin/tools
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
..
.gitignore Remove genrandom command and all usage of specific random files throughout the system test suite 2018-05-16 09:54:35 +02:00
arpaname.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
arpaname.rst Use semantic markup for :program: self-references 2022-03-14 10:57:29 +01:00
dnstap-read.c Replace ISC_NORETURN with C11's noreturn 2022-03-25 08:42:18 +01:00
dnstap-read.rst Add internal hyperlinks to See Also section of manual pages 2022-03-14 11:01:32 +01:00
Makefile.am Fix the remaining cases of <prog>_CFLAGS -> <prog>_CPPFLAGS 2022-03-13 18:53:19 +01:00
mdig.c Ensure that dns_request_createvia() has a retry limit 2022-04-06 18:17:55 +01:00
mdig.rst Add internal hyperlinks to See Also section of manual pages 2022-03-14 11:01:32 +01:00
named-journalprint.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
named-journalprint.rst Add internal hyperlinks to See Also section of manual pages 2022-03-14 11:01:32 +01:00
named-nzd2nzf.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
named-nzd2nzf.rst Hyperlink program names to their manual pages 2022-03-14 11:01:31 +01:00
named-rrchecker.c Replace ISC_NORETURN with C11's noreturn 2022-03-25 08:42:18 +01:00
named-rrchecker.rst Add internal hyperlinks to See Also section of manual pages 2022-03-14 11:01:32 +01:00
nsec3hash.c Replace ISC_NORETURN with C11's noreturn 2022-03-25 08:42:18 +01:00
nsec3hash.rst Use semantic markup for :program: self-references 2022-03-14 10:57:29 +01:00