bind9/bin
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
..
check Replace ISC_NORETURN with C11's noreturn 2022-03-25 08:42:18 +01:00
confgen Replace ISC_NORETURN with C11's noreturn 2022-03-25 08:42:18 +01:00
delv Remove UNREACHABLE() statements after exit() 2022-03-25 10:07:25 +01:00
dig Fix using unset pointer when printing a debug message in dighost.c 2022-04-05 11:54:06 +00:00
dnssec Remove use of the inline keyword used as suggestion to compiler 2022-03-25 08:42:18 +01:00
named Rename the configuration option to load balance sockets to reuseport 2022-04-06 17:24:13 +02:00
nsupdate Remove use of the inline keyword used as suggestion to compiler 2022-03-25 08:42:18 +01:00
plugins Hyperlink program names to their manual pages 2022-03-14 11:01:31 +01:00
rndc Replace ISC_NORETURN with C11's noreturn 2022-03-25 08:42:18 +01:00
tests Ensure that dns_request_createvia() has a retry limit 2022-04-06 18:17:55 +01:00
tools Ensure that dns_request_createvia() has a retry limit 2022-04-06 18:17:55 +01:00
Makefile.am Remove native PKCS#11 support 2021-09-09 15:35:39 +02:00