summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuanghua Zhang <ghzhang@fiberhome.com>2019-08-24 10:52:19 +0800
committerAndrew Yourtchenko <ayourtch@gmail.com>2019-09-29 10:17:24 +0000
commit1b13beb84556bb288b04ce36cc6b73d980f84a63 (patch)
tree8f0078c9571da93fbf0d70eff311ea966bfef010
parentc2cfe5d8e5c1e12be8d82dbe1d86ca8077c42982 (diff)
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 (cherry picked from commit fcd5e12b1c879b27d9ed53c9c5b3ae98b0a04ccf)
-rw-r--r--src/vnet/session/session_lookup.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/vnet/session/session_lookup.c b/src/vnet/session/session_lookup.c
index f1e715e4aab..4c13d016ba4 100644
--- a/src/vnet/session/session_lookup.c
+++ b/src/vnet/session/session_lookup.c
@@ -1410,6 +1410,8 @@ session_rule_command_fn (vlib_main_t * vm, unformat_input_t * input,
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 @@ show_session_rules_command_fn (vlib_main_t * vm, unformat_input_t * input,
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)