Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
tls: handle disconect and reset in async mode
[vpp.git]
/
src
/
plugins
/
tlsopenssl
/
tls_async.c
diff --git
a/src/plugins/tlsopenssl/tls_async.c
b/src/plugins/tlsopenssl/tls_async.c
index
100a75b
..
8660466
100644
(file)
--- a/
src/plugins/tlsopenssl/tls_async.c
+++ b/
src/plugins/tlsopenssl/tls_async.c
@@
-303,6
+303,18
@@
vpp_tls_async_init_event (tls_ctx_t * ctx,
return 1;
}
return 1;
}
+int
+vpp_openssl_is_inflight (tls_ctx_t * ctx)
+{
+ u32 eidx;
+ openssl_evt_t *event;
+ eidx = ctx->evt_index;
+ event = openssl_evt_get (eidx);
+
+ if (event->status == SSL_ASYNC_INFLIGHT)
+ return 1;
+ return 0;
+}
int
vpp_tls_async_update_event (tls_ctx_t * ctx, int eagain)
int
vpp_tls_async_update_event (tls_ctx_t * ctx, int eagain)
@@
-310,13
+322,11
@@
vpp_tls_async_update_event (tls_ctx_t * ctx, int eagain)
u32 eidx;
openssl_evt_t *event;
u32 eidx;
openssl_evt_t *event;
+ eidx = ctx->evt_index;
+ event = openssl_evt_get (eidx);
+ event->status = SSL_ASYNC_INFLIGHT;
if (eagain)
if (eagain)
- {
- eidx = ctx->evt_index;
- event = openssl_evt_get (eidx);
-
- return tls_async_openssl_callback (0, &event->cb_args);
- }
+ return tls_async_openssl_callback (0, &event->cb_args);
return 1;
}
return 1;
}