]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
TLS: fix double resumption in isc__nm_tls_resumeread()
authorArtem Boldariev <artem@boldariev.com>
Fri, 15 Jul 2022 17:38:52 +0000 (20:38 +0300)
committerArtem Boldariev <artem@boldariev.com>
Tue, 26 Jul 2022 11:25:59 +0000 (14:25 +0300)
This commit fixes an obvious error in isc__nm_tls_resumeread() so that
read cannot be resumed twice.

lib/isc/netmgr/tlsstream.c

index 13789cd86a9c971b2395de6a9c76e1e2118a413a..e34e74cc4619a51140b9bf21fe426c8a1f6398d0 100644 (file)
@@ -855,7 +855,7 @@ isc__nm_tls_resumeread(isc_nmhandle_t *handle) {
        REQUIRE(VALID_NMSOCK(handle->sock));
 
        if (!atomic_compare_exchange_strong(&handle->sock->readpaused,
-                                           &(bool){ false }, false))
+                                           &(bool){ true }, false))
        {
                if (inactive(handle->sock)) {
                        return;