bind9/lib/dns
Aram Sargsyan d91edda639 Fix a clients-per-query miscalculation bug
The number of clients per query is calculated using the pending
fetch responses in the list. The dns_resolver_createfetch() function
includes every item in the list when deciding whether the limit is
reached (i.e. fctx->spilled is true). Then, when the limit is reached,
there is another calculation in fctx_sendevents(), when deciding
whether it is needed to increase the limit, but this time the TRYSTALE
responses are not included in the calculation (because of early break
from the loop), and because of that the limit is never increased.

A single client can have more than one associated response/event in the
list (currently max. two), and calculating them as separate "clients"
is unexpected. E.g. if 'stale-answer-enable' is enabled and
'stale-answer-client-timeout' is enabled and is larger than 0, then
each client will have two events, which will effectively halve the
clients-per-query limit.

Fix the dns_resolver_createfetch() function to calculate only the
regular FETCHDONE responses/events.

Change the fctx_sendevents() function to also calculate only FETCHDONE
responses/events. Currently, this second change doesn't have any impact,
because the TRYSTALE events were already skipped, but having the same
condition in both places will help prevent similar bugs in the future
if a new type of response/event is ever added.

(cherry picked from commit 2ae5c4a674)
2023-06-06 12:45:00 +00:00
..
include Add ClientQuota statistics channel counter 2023-05-31 11:07:08 +00:00
rdata Update sources to Clang 15 formatting 2022-11-29 09:14:07 +01: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-26 14:21:57 +02:00
adb.c Properly name ADB hashmap and named log memory contexts 2023-01-30 12:38:13 +01:00
badcache.c Update sources to Clang 15 formatting 2022-11-29 09:14:07 +01:00
byaddr.c Update sources to Clang 15 formatting 2022-11-29 09:14:07 +01:00
cache.c Add dns_db_allrdatasets options 2022-12-07 23:59:36 +00:00
callbacks.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
catz.c Attach catzs to catz instead of doing this explicitly 2023-04-04 11:47:43 +00:00
client.c Extend dns_db_allrdatasets to control interation results 2022-12-07 23:59:36 +00:00
clientinfo.c refactor dns_clientinfo_init(); use separate function to set ECS 2023-02-08 00:13:12 -08:00
compress.c Update sources to Clang 15 formatting 2022-11-29 09:14:07 +01:00
db.c Extend dns_db_allrdatasets to control interation results 2022-12-07 23:59:36 +00:00
dbiterator.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
diff.c Update sources to Clang 15 formatting 2022-11-29 09:14:07 +01:00
dispatch.c fix handling of TCP timeouts 2023-05-26 02:07:02 -07:00
dlz.c Remove use of the inline keyword used as suggestion to compiler 2022-03-25 08:42:18 +01:00
dns64.c Add isc_rwlock around dns_aclenv .localhost and .localnets member 2022-04-26 14:21:57 +02:00
dnsrps.c Handle iterator options in rpsdb_allrdatasets() 2023-02-01 11:26:31 +01:00
dnssec.c Report key name when removing it 2023-03-14 16:26:56 +11:00
dnstap.c dnstap query_message field was erroneously set with responses 2022-08-31 15:24:00 -07: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:42:16 +01:00
dst_api.c Eliminate the dead code in dst_api.c 2023-04-05 09:11:24 +02:00
dst_internal.h Replace isc_fsaccess API with more secure file creation 2023-03-31 16:47:15 +02:00
dst_openssl.h Use autoconf check for BN_GENCB_new() 2022-03-02 10:49:47 +00:00
dst_parse.c Replace isc_fsaccess API with more secure file creation 2023-03-31 16:47:15 +02:00
dst_parse.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
dyndb.c remove isc_bind9 variable 2023-02-09 10:07:39 -08:00
ecs.c Update sources to Clang 15 formatting 2022-11-29 09:14:07 +01:00
fixedname.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
forward.c Use sizeof(*ptr) for allocating/freeing memory in forward.c 2023-01-11 13:42:09 +00:00
gen.c Update sources to Clang 15 formatting 2022-11-29 09:14:07 +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 16:05:56 +00:00
gssapictx.c Remove use of the inline keyword used as suggestion to compiler 2022-03-25 08:42:18 +01:00
hmac_link.c In hmac_createctx free ctx on isc_hmac_init failure 2023-02-18 10:26:55 +11:00
ipkeylist.c remove nonfunctional DSCP implementation 2023-01-09 14:23:26 -08:00
iptable.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
journal.c Extend dns_db_allrdatasets to control interation results 2022-12-07 23:59:36 +00:00
kasp.c Store built-in dnssec-policies in defaultconf 2022-06-28 14:36:38 +02:00
key.c Update sources to Clang 15 formatting 2022-11-29 09:14:07 +01:00
keydata.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
keymgr.c Add key state init debugging 2023-04-17 12:14:06 +02:00
keytable.c Handle dns_rdata_fromstruct failure dns_keytable_deletekey 2023-04-03 17:46:13 +02: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:42:18 +01:00
Makefile.am Update libdns_la_LIBADD rather than libdns_la_LDFLAGS 2022-07-13 10:46:37 +10:00
master.c Fix scan-build issue: initialized value never read 2023-03-29 13:31:49 +00:00
masterdump.c Add dns_db_allrdatasets options 2022-12-07 23:59:36 +00:00
message.c Update sources to Clang 15 formatting 2022-11-29 09:14:07 +01:00
name.c Update sources to Clang 15 formatting 2022-11-29 09:14:07 +01:00
ncache.c Update sources to Clang 15 formatting 2022-11-29 09:14:07 +01:00
nsec.c Extend dns_db_allrdatasets to control interation results 2022-12-07 23:59:36 +00:00
nsec3.c Cleanup orphaned empty-non-terminal NSEC3 2023-04-25 06:46:08 +01:00
nta.c Don't use reference counting in isc_timer unit 2023-01-18 22:39:26 +01:00
openssl_link.c Update sources to Clang 15 formatting 2022-11-29 09:14:07 +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 Update sources to Clang 15 formatting 2022-11-29 09:14:07 +01:00
opensslecdsa_link.c Update sources to Clang 15 formatting 2022-11-29 09:14:07 +01:00
openssleddsa_link.c Update sources to Clang 15 formatting 2022-11-29 09:14:07 +01:00
opensslrsa_link.c Update sources to Clang 15 formatting 2022-11-29 09:14:07 +01:00
order.c Update sources to Clang 15 formatting 2022-11-29 09:14:07 +01:00
peer.c remove nonfunctional DSCP implementation 2023-01-09 14:23:26 -08:00
private.c Update sources to Clang 15 formatting 2022-11-29 09:14:07 +01:00
rbt.c Update sources to Clang 15 formatting 2022-11-29 09:14:07 +01:00
rbtdb.c Add missing node lock when setting node->wild in rbtdb.c 2023-01-20 00:46:24 +11:00
rbtdb.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
rcode.c Update sources to Clang 15 formatting 2022-11-29 09:14:07 +01:00
rdata.c Update sources to Clang 15 formatting 2022-11-29 09:14:07 +01:00
rdatalist.c Update sources to Clang 15 formatting 2022-11-29 09:14:07 +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 Define DNS_RDATASET_INIT for static initialisation 2023-02-09 08:58:15 +11:00
rdatasetiter.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
rdataslab.c Update sources to Clang 15 formatting 2022-11-29 09:14:07 +01:00
request.c Do not resend TCP requests 2023-04-03 16:18:39 +00:00
resolver.c Fix a clients-per-query miscalculation bug 2023-06-06 12:45:00 +00:00
result.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
rootns.c Extend dns_db_allrdatasets to control interation results 2022-12-07 23:59:36 +00:00
rpz.c Fix RPZ reference counting error on shutdown 2023-02-14 11:21:40 +00:00
rriterator.c Extend dns_db_allrdatasets to control interation results 2022-12-07 23:59:36 +00:00
rrl.c Update sources to Clang 15 formatting 2022-11-29 09:14:07 +01:00
sdb.c Extend dns_db_allrdatasets to control interation results 2022-12-07 23:59:36 +00:00
sdlz.c Extend dns_db_allrdatasets to control interation results 2022-12-07 23:59:36 +00:00
soa.c Remove use of the inline keyword used as suggestion to compiler 2022-03-25 08:42:18 +01:00
ssu.c Update sources to Clang 15 formatting 2022-11-29 09:14:07 +01:00
ssu_external.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
stats.c Update sources to Clang 15 formatting 2022-11-29 09:14:07 +01:00
tests Move all the unit tests to /tests/<libname>/ 2022-05-31 12:06:00 +02:00
time.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
tkey.c Update sources to Clang 15 formatting 2022-11-29 09:14:07 +01:00
transport.c Rename "hostname" to "remote-hostname" within "tls" 2022-05-03 17:42:43 +03:00
tsec.c Simplify way we tag unreachable code with only ISC_UNREACHABLE() 2022-03-25 08:42:16 +01:00
tsig.c prevent TSIG keys from being added to multiple rings 2023-05-25 15:08:48 -07: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 Extend dns_db_allrdatasets to control interation results 2022-12-07 23:59:36 +00:00
validator.c Reduce the number of verifiations required 2023-04-03 17:46:13 +02:00
view.c dns_view_untrust modifies dnskey->flags when it shouldn't 2023-04-03 17:46:13 +02:00
xfrin.c Implement maximum global and idle time for incoming XFR 2023-04-21 17:21:32 +02:00
zone.c ZMGR: TLS contexts cache - properly synchronise access 2023-05-26 15:24:51 +03: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 sources to Clang 15 formatting 2022-11-29 09:14:07 +01:00
zoneverify.c Extend dns_db_allrdatasets to control interation results 2022-12-07 23:59:36 +00:00
zt.c Update sources to Clang 15 formatting 2022-11-29 09:14:07 +01:00