bind9/lib
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
..
bind9 deprecate delegation-only and root-delegation only 2023-03-23 14:09:53 -07:00
dns Fix a clients-per-query miscalculation bug 2023-06-06 12:45:00 +00:00
irs Properly process extra nameserver lines in resolv.conf 2023-05-16 13:29:33 +10:00
isc Move isc_mem_put to after node is checked for equality 2023-05-29 13:27:51 +10:00
isccc Update sources to Clang 15 formatting 2022-11-29 09:14:07 +01:00
isccfg mark 'tkey-dhkey' as deprecated 2023-05-28 00:55:34 -07:00
ns Use appropriately sized send buffers for DNS messages over TCP 2023-06-06 14:04:01 +02:00
.gitignore The isc/platform.h header has been completely removed 2021-07-06 05:33:48 +00:00
Makefile.am move samples/resolve.c to bin/tests/system 2021-04-16 14:29:43 +02:00