BUG/MEDIUM: ssl: Don't call ssl_sock_io_cb() directly.
authorOlivier Houchard <cognet@ci0.org>
Tue, 15 Sep 2020 20:16:02 +0000 (22:16 +0200)
committerOlivier Houchard <cognet@ci0.org>
Tue, 15 Sep 2020 20:16:02 +0000 (22:16 +0200)
commita45982605607f8acea82d39ce6ddeda3c1e42d4c
tree7050fed8dbc46b3ae80ed842d99ef2ed7b1c6d48
parent9743f709d03c036b7a6da2fb260d0e77f9e04a3d
BUG/MEDIUM: ssl: Don't call ssl_sock_io_cb() directly.

In the SSL code, when we were waiting for the availability of the crypto
engine, once it is ready and its fd's I/O handler is called, don't call
ssl_sock_io_cb() directly, instead, call tasklet_wakeup() on the
ssl_sock_ctx's tasklet. We were calling ssl_sock_io_cb() with NULL as
a tasklet, which used to be fine, but it is no longer true since the
fd takeover changes. We could just provide the tasklet, but let's just
wake the tasklet, as is done for other FDs, for fairness.

This should fix github issue #856.

This should be backported into 2.2.
src/ssl_sock.c