diff options
author | Florin Coras <fcoras@cisco.com> | 2020-04-24 16:59:49 +0000 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2020-04-25 11:40:43 +0000 |
commit | 681ea6dd287ed56b4ef32ba831cf9ae7d10c10de (patch) | |
tree | 187b9a8d26b908956f4dfd200bf481e4a8eaf023 /src/vnet | |
parent | 36d49391aadeb10b9f3626b62c5c019c4fddf5ed (diff) |
tls: improve cli state reporting
Type: improvement
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I02d60134d6069764da75dc6d206b376a0d46998e
Diffstat (limited to 'src/vnet')
-rw-r--r-- | src/vnet/tls/tls.c | 15 |
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; } |