summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-11-01 14:03:28 -0700
committerDave Barach <openvpp@barachs.net>2019-11-03 17:55:28 +0000
commit2d0b2bbb97d57cb4bac30e4f3138b70c277aee47 (patch)
tree0b03f7005f6edb6fa8314c4e60e027641081ca37
parentdd97a48d9fac91c7f16a31aa661dd6c968c3b760 (diff)
session: fix show cli with closed session
Type: fix Change-Id: Ifb6ead644c0273b84a5647f7923053f1db7c5a76 Signed-off-by: Florin Coras <fcoras@cisco.com>
-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)
166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319