summaryrefslogtreecommitdiffstats
path: root/src/vnet/session
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-11-01 14:03:28 -0700
committerAndrew Yourtchenko <ayourtch@gmail.com>2019-11-15 07:22:59 +0000
commit066ebabc5a293b5ba70e506e8fd92c7f891ed9c2 (patch)
tree601f5c52223394187ad686fbb027135b4953012f /src/vnet/session
parentb5a0108acf1731d0d77e8f1240363b10e86f95da (diff)
session: fix show cli with closed session
Type: fix Change-Id: Ifb6ead644c0273b84a5647f7923053f1db7c5a76 Signed-off-by: Florin Coras <fcoras@cisco.com> (cherry picked from commit 2d0b2bbb97d57cb4bac30e4f3138b70c277aee47)
Diffstat (limited to 'src/vnet/session')
-rwxr-xr-xsrc/vnet/session/session_cli.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/vnet/session/session_cli.c b/src/vnet/session/session_cli.c
index 770ae086cc0..b03353e564a 100755
--- a/src/vnet/session/session_cli.c
+++ b/src/vnet/session/session_cli.c
@@ -252,7 +252,7 @@ static void
session_cli_show_all_sessions (vlib_main_t * vm, int verbose)
{
session_main_t *smm = &session_main;
- u32 n_closed = 0, thread_index;
+ u32 n_closed, thread_index;
session_t *pool, *s;
for (thread_index = 0; thread_index < vec_len (smm->wrk); thread_index++)
@@ -285,6 +285,8 @@ session_cli_show_all_sessions (vlib_main_t * vm, int verbose)
thread_index ? "\n" : "",
"Connection", "State", "Rx-f", "Tx-f");
+ n_closed = 0;
+
/* *INDENT-OFF* */
pool_foreach(s, pool, ({
if (s->session_state >= SESSION_STATE_TRANSPORT_DELETED)