bind9/lib/dns
Tony Finch 71ce8b0a51 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.)
2022-04-06 17:12:48 +01:00
..
include Run the RPZ update as offloaded work 2022-04-04 21:20:05 +02:00
rdata Remove use of the inline keyword used as suggestion to compiler 2022-03-25 08:33:43 +01:00
tests Use isc_nm_getnworkers to manage zone resources 2022-04-01 23:50:34 +02:00
.gitignore 4394. [func] Add rndc command "dnstap-reopen" to close and 2016-06-24 09:37:04 +10:00
acl.c Add isc_rwlock around dns_aclenv .localhost and .localnets member 2022-04-04 19:27:00 +02:00
adb.c Move lock to before label to prevent duplicate lock 2022-04-06 12:56:17 +10:00
badcache.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
byaddr.c Remove use of the inline keyword used as suggestion to compiler 2022-03-25 08:33:43 +01:00
cache.c Purge the .resched_event in dns_cache 2022-04-01 23:45:23 +02:00
callbacks.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
catz.c Don't use reference counting in isc_timer unit 2022-04-02 01:23:15 +02:00
client.c Remove isc_appctx_t use in dns_client 2022-03-29 14:14:49 -07:00
clientinfo.c allow dns_clientinfo to store client ECS data 2022-01-27 13:53:59 -08:00
compress.c Remove use of the inline keyword used as suggestion to compiler 2022-03-25 08:33:43 +01:00
db.c Remove use of the inline keyword used as suggestion to compiler 2022-03-25 08:33:43 +01:00
dbiterator.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
diff.c Simplify way we tag unreachable code with only ISC_UNREACHABLE() 2022-03-25 08:33:43 +01:00
dispatch.c Remove extrahandle size from netmgr 2022-03-25 10:38:35 +01:00
dlz.c Set hard thread affinity for each zone 2022-04-01 23:50:34 +02:00
dns64.c Add isc_rwlock around dns_aclenv .localhost and .localnets member 2022-04-04 19:27:00 +02:00
dnsrps.c Simplify way we tag unreachable code with only ISC_UNREACHABLE() 2022-03-25 08:33:43 +01:00
dnssec.c Remove use of the inline keyword used as suggestion to compiler 2022-03-25 08:33:43 +01:00
dnstap.c Simplify way we tag unreachable code with only ISC_UNREACHABLE() 2022-03-25 08:33:43 +01:00
dnstap.proto Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
ds.c Simplify way we tag unreachable code with only ISC_UNREACHABLE() 2022-03-25 08:33:43 +01:00
dst_api.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
dst_internal.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
dst_openssl.h Use autoconf check for BN_GENCB_new() 2022-03-02 10:48:09 +00:00
dst_parse.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
dst_parse.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
dyndb.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
ecs.c Simplify way we tag unreachable code with only ISC_UNREACHABLE() 2022-03-25 08:33:43 +01:00
fixedname.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
forward.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
gen.c Merge lib/dns/gen.h contents to lib/dns/gen.c 2022-03-04 14:13:58 +01:00
geoip2.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
gssapi_link.c Remove a redundant variable-length array 2022-03-18 15:06:31 +00:00
gssapictx.c Remove use of the inline keyword used as suggestion to compiler 2022-03-25 08:33:43 +01:00
hmac_link.c Remove use of the inline keyword used as suggestion to compiler 2022-03-25 08:33:43 +01:00
ipkeylist.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
iptable.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
journal.c Remove use of the inline keyword used as suggestion to compiler 2022-03-25 08:33:43 +01:00
kasp.c Remove use of the inline keyword used as suggestion to compiler 2022-03-25 08:33:43 +01:00
key.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
keydata.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
keymgr.c Simplify way we tag unreachable code with only ISC_UNREACHABLE() 2022-03-25 08:33:43 +01:00
keytable.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
log.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
lookup.c Remove use of the inline keyword used as suggestion to compiler 2022-03-25 08:33:43 +01:00
Makefile.am Merge lib/dns/gen.h contents to lib/dns/gen.c 2022-03-04 14:13:58 +01:00
master.c Prevent arithmetic overflow of 'i' in master.c:generate 2022-04-01 07:56:52 +00:00
masterdump.c Simplify way we tag unreachable code with only ISC_UNREACHABLE() 2022-03-25 08:33:43 +01:00
message.c Add isc_rwlock around dns_aclenv .localhost and .localnets member 2022-04-04 19:27:00 +02:00
name.c consolidate fibonacci hashing in one place 2022-03-28 14:44:21 -07:00
ncache.c Remove use of the inline keyword used as suggestion to compiler 2022-03-25 08:33:43 +01:00
nsec.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
nsec3.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
nta.c Don't use reference counting in isc_timer unit 2022-04-02 01:23:15 +02:00
openssl_link.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
openssl_shim.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
openssl_shim.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
openssldh_link.c Use autoconf check for BN_GENCB_new() 2022-03-02 10:48:09 +00:00
opensslecdsa_link.c Simplify way we tag unreachable code with only ISC_UNREACHABLE() 2022-03-25 08:33:43 +01:00
openssleddsa_link.c Add couple missing braces around single-line statements 2022-03-17 18:27:45 +01:00
opensslrsa_link.c Simplify way we tag unreachable code with only ISC_UNREACHABLE() 2022-03-25 08:33:43 +01:00
order.c Remove use of the inline keyword used as suggestion to compiler 2022-03-25 08:33:43 +01:00
peer.c Simplify way we tag unreachable code with only ISC_UNREACHABLE() 2022-03-25 08:33:43 +01:00
private.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
rbt.c consolidate fibonacci hashing in one place 2022-03-28 14:44:21 -07:00
rbtdb.c consolidate fibonacci hashing in one place 2022-03-28 14:44:21 -07:00
rbtdb.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
rcode.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
rdata.c Remove use of the inline keyword used as suggestion to compiler 2022-03-25 08:33:43 +01:00
rdatalist.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
rdatalist_p.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
rdataset.c Remove use of the inline keyword used as suggestion to compiler 2022-03-25 08:33:43 +01:00
rdatasetiter.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
rdataslab.c Remove use of the inline keyword used as suggestion to compiler 2022-03-25 08:33:43 +01:00
request.c Ensure that dns_request_createvia() has a retry limit 2022-04-06 17:12:48 +01:00
resolver.c Don't use reference counting in isc_timer unit 2022-04-02 01:23:15 +02:00
result.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
rootns.c Add FALLTHROUGH macro for __attribute__((fallthrough)) 2022-03-25 08:33:43 +01:00
rpz.c Run the RPZ update as offloaded work 2022-04-04 21:20:05 +02:00
rriterator.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
rrl.c Remove use of the inline keyword used as suggestion to compiler 2022-03-25 08:33:43 +01:00
sdb.c Remove use of the inline keyword used as suggestion to compiler 2022-03-25 08:33:43 +01:00
sdlz.c Remove use of the inline keyword used as suggestion to compiler 2022-03-25 08:33:43 +01:00
soa.c Remove use of the inline keyword used as suggestion to compiler 2022-03-25 08:33:43 +01:00
ssu.c Add isc_rwlock around dns_aclenv .localhost and .localnets member 2022-04-04 19:27:00 +02:00
ssu_external.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
stats.c Remove use of the inline keyword used as suggestion to compiler 2022-03-25 08:33:43 +01:00
time.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
tkey.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
transport.c Simplify way we tag unreachable code with only ISC_UNREACHABLE() 2022-03-25 08:33:43 +01:00
tsec.c Simplify way we tag unreachable code with only ISC_UNREACHABLE() 2022-03-25 08:33:43 +01:00
tsig.c Remove workaround for ancient clang versions (<< 3.2 and << 4.0.1) 2022-03-25 08:33:43 +01:00
tsig_p.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
ttl.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
update.c Create per-thread task and memory context for zonemgr 2022-04-01 23:50:34 +02:00
validator.c Remove use of the inline keyword used as suggestion to compiler 2022-03-25 08:33:43 +01:00
view.c Refactor ADB reference counting, shutdown and locking 2022-03-30 10:12:25 +02:00
xfrin.c Add support for Strict/Mutual TLS into BIND 2022-03-28 16:22:53 +03:00
zone.c Ensure that dns_request_createvia() has a retry limit 2022-04-06 17:12:48 +01:00
zone_p.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
zonekey.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
zoneverify.c Remove use of the inline keyword used as suggestion to compiler 2022-03-25 08:33:43 +01:00
zt.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00