From e3c628d56228aca637dda77c1e568153d8995afc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Thu, 1 Dec 2022 18:31:05 +0100 Subject: [PATCH] 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. --- lib/isc/netmgr/tlsdns.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/isc/netmgr/tlsdns.c b/lib/isc/netmgr/tlsdns.c index db8d709580..0da0dfe7f1 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; }