From: Ondřej Surý Date: Thu, 1 Dec 2022 17:31:05 +0000 (+0100) Subject: Honour single read per client isc_nm_read() call in the TLSDNS X-Git-Tag: v9.19.8~25^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e3c628d56228aca637dda77c1e568153d8995afc;p=thirdparty%2Fbind9.git Honour single read per client isc_nm_read() call in the TLSDNS The TLSDNS transport was not honouring the single read callback for TLSDNS client. It would call the read callbacks repeatedly in case the single TLS read would result in multiple DNS messages in the decoded buffer. --- diff --git a/lib/isc/netmgr/tlsdns.c b/lib/isc/netmgr/tlsdns.c index db8d7095801..0da0dfe7f1a 100644 --- a/lib/isc/netmgr/tlsdns.c +++ b/lib/isc/netmgr/tlsdns.c @@ -1127,6 +1127,10 @@ tls_cycle_input(isc_nmsocket_t *sock) { goto failure; } + if (atomic_load(&sock->client)) { + break; + } + if (pending == 0) { break; }