]> 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 12:27:40 +0000 (15:27 +0300)
commita165b66fc7e2bb58579ca6221f7161c06631dd31
treec3dfba46cd054670500f2bbab5a3428f5d1eef55
parent80f777ccfea541ebd2e1757884eb831226cdc7a7
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