]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Honour single read per client isc_nm_read() call in the TLSDNS
authorOndřej Surý <ondrej@isc.org>
Thu, 1 Dec 2022 17:31:05 +0000 (18:31 +0100)
committerOndřej Surý <ondrej@isc.org>
Thu, 1 Dec 2022 17:31:05 +0000 (18:31 +0100)
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

index db8d70958017ec1dbf050f87749b4ec4d361b54d..0da0dfe7f1a59eb1f7f19e95e2ba011a056eb810 100644 (file)
@@ -1127,6 +1127,10 @@ tls_cycle_input(isc_nmsocket_t *sock) {
                                goto failure;
                        }
 
+                       if (atomic_load(&sock->client)) {
+                               break;
+                       }
+
                        if (pending == 0) {
                                break;
                        }