summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/application_namespace.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2017-11-09 02:06:07 -0800
committerDave Wallace <dwallacelf@gmail.com>2017-11-09 14:42:09 +0000
commit264080855e4b33cef5cb19a948f2df2ae597073f (patch)
treebba4957694202fe95ebec81dffe40afb9a774e44 /src/vnet/session/application_namespace.c
parent2769710f9f25f7881aeac75419c2ae817da0bc82 (diff)
session: fix app ns list cli dump
Change-Id: I9b0a4676d088bc7587d12023fc3a3ea53aeaba20 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/session/application_namespace.c')
-rw-r--r--src/vnet/session/application_namespace.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/vnet/session/application_namespace.c b/src/vnet/session/application_namespace.c
index 700f83980ba..eaf09e8e369 100644
--- a/src/vnet/session/application_namespace.c
+++ b/src/vnet/session/application_namespace.c
@@ -260,12 +260,15 @@ show_app_ns_fn (vlib_main_t * vm, unformat_input_t * main_input,
unformat_input_t _line_input, *line_input = &_line_input;
app_namespace_t *app_ns;
session_table_t *st;
- u8 *ns_id, do_table = 0;
+ u8 *ns_id, do_table = 0, had_input = 1;
session_cli_return_if_not_enabled ();
if (!unformat_user (main_input, unformat_line_input, line_input))
- return 0;
+ {
+ had_input = 0;
+ goto do_ns_list;
+ }
while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
{
@@ -300,7 +303,7 @@ show_app_ns_fn (vlib_main_t * vm, unformat_input_t * main_input,
vlib_cli_output (vm, "%-20s%-20s%-20s", "Namespace", "Secret",
"sw_if_index");
-
+do_ns_list:
/* *INDENT-OFF* */
pool_foreach (app_ns, app_namespace_pool, ({
vlib_cli_output (vm, "%U", format_app_namespace, app_ns);
@@ -308,7 +311,8 @@ show_app_ns_fn (vlib_main_t * vm, unformat_input_t * main_input,
/* *INDENT-ON* */
done:
- unformat_free (line_input);
+ if (had_input)
+ unformat_free (line_input);
return 0;
}