]> git.ipfire.org Git - thirdparty/bind9.git/commit
TLS: clear 'errno' when handling SSL status
authorArtem Boldariev <artem@boldariev.com>
Thu, 14 Jul 2022 20:33:26 +0000 (23:33 +0300)
committerArtem Boldariev <artem@boldariev.com>
Tue, 26 Jul 2022 11:25:59 +0000 (14:25 +0300)
commit5d450cd0baf3f3f8149cbb96d303bfc51995aa65
tree1cbba9921bc375a9757209d883b68b4f0bb9a704
parent6f15cace5e3511ed5d8ab462a5680a24929c02d3
TLS: clear 'errno' when handling SSL status

Sometimes tls_do_bio() might be called when there is no new data to
process (most notably, when resuming reads), in such a case internal
TLS session state will remain untouched and old value in 'errno' will
alter the result of SSL_get_error() call, possibly making it to return
SSL_ERROR_SYSCALL. This value will be treated as an error, and will
lead to closing the connection, which is not what expected.
lib/isc/netmgr/tlsstream.c