aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/vnet/tls/tls.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/vnet/tls/tls.c b/src/vnet/tls/tls.c
index 1af0857d7f2..c9509b7080d 100644
--- a/src/vnet/tls/tls.c
+++ b/src/vnet/tls/tls.c
@@ -788,10 +788,19 @@ format_tls_ctx_state (u8 * s, va_list * args)
ts = session_get_from_handle (ctx->app_session_handle);
if (ts->session_state == SESSION_STATE_LISTENING)
s = format (s, "%s", "LISTEN");
- else if (tls_ctx_handshake_is_over (ctx))
- s = format (s, "%s", "ESTABLISHED");
else
- s = format (s, "%s", "HANDSHAKE");
+ {
+ if (ts->session_state >= SESSION_STATE_TRANSPORT_CLOSED)
+ s = format (s, "%s", "CLOSED");
+ else if (ts->session_state == SESSION_STATE_APP_CLOSED)
+ s = format (s, "%s", "APP-CLOSED");
+ else if (ts->session_state >= SESSION_STATE_TRANSPORT_CLOSING)
+ s = format (s, "%s", "CLOSING");
+ else if (tls_ctx_handshake_is_over (ctx))
+ s = format (s, "%s", "ESTABLISHED");
+ else
+ s = format (s, "%s", "HANDSHAKE");
+ }
return s;
}