session : make sure session layer is enabled when cli operate the sessions.
Type: fix
show session rules tcp
vpp/src/vnet/session/application_namespace.c:34 (app_namespace_get)
assertion `! pool_is_free (app_namespace_pool, _e)' fails
Thread 1 "vpp_main" received signal SIGABRT, Aborted.
Signed-off-by: Guanghua Zhang <ghzhang@fiberhome.com>
Change-Id: I3430339a598a92d0a38826471adeb4547b0b7df4
diff --git a/src/vnet/session/session_lookup.c b/src/vnet/session/session_lookup.c
index f1e715e..4c13d01 100644
--- a/src/vnet/session/session_lookup.c
+++ b/src/vnet/session/session_lookup.c
@@ -1410,6 +1410,8 @@
app_namespace_t *app_ns;
int rv;
+ session_cli_return_if_not_enabled ();
+
clib_memset (&lcl_ip, 0, sizeof (lcl_ip));
clib_memset (&rmt_ip, 0, sizeof (rmt_ip));
while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
@@ -1560,6 +1562,8 @@
session_table_t *st;
u8 *ns_id = 0, fib_proto;
+ session_cli_return_if_not_enabled ();
+
clib_memset (&lcl_ip, 0, sizeof (lcl_ip));
clib_memset (&rmt_ip, 0, sizeof (rmt_ip));
while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)