]> 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 12:27:40 +0000 (15:27 +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 fb5ce01219e00a7eacb43edf8abf7dc038acb9b4..ef3f70fc420ef5bb06ecac47d2b50ffcfc05ca33 100644 (file)
@@ -860,7 +860,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;