diff options
Diffstat (limited to 'vnet')
-rw-r--r-- | vnet/vnet/lisp-gpe/lisp_gpe.c | 11 | ||||
-rw-r--r-- | vnet/vnet/lisp-gpe/lisp_gpe.h | 3 |
2 files changed, 14 insertions, 0 deletions
diff --git a/vnet/vnet/lisp-gpe/lisp_gpe.c b/vnet/vnet/lisp-gpe/lisp_gpe.c index 6ccc5f0d32e..4c39bf97cae 100644 --- a/vnet/vnet/lisp-gpe/lisp_gpe.c +++ b/vnet/vnet/lisp-gpe/lisp_gpe.c @@ -445,6 +445,14 @@ VLIB_CLI_COMMAND (show_lisp_gpe_tunnel_command, static) = { .function = show_lisp_gpe_tunnel_command_fn, }; +u8 +vnet_lisp_gpe_enable_disable_status(void) +{ + lisp_gpe_main_t * lgm = &lisp_gpe_main; + + return lgm->is_en; +} + clib_error_t * vnet_lisp_gpe_enable_disable (vnet_lisp_gpe_enable_disable_args_t * a) { @@ -471,6 +479,8 @@ vnet_lisp_gpe_enable_disable (vnet_lisp_gpe_enable_disable_args_t * a) { /* ask cp to re-add ifaces and defaults */ } + + lgm->is_en = 1; } else { @@ -509,6 +519,7 @@ vnet_lisp_gpe_enable_disable (vnet_lisp_gpe_enable_disable_args_t * a) vnet_lisp_gpe_add_del_iface(ai, 0); } vec_free(table_ids); + lgm->is_en = 0; } return 0; diff --git a/vnet/vnet/lisp-gpe/lisp_gpe.h b/vnet/vnet/lisp-gpe/lisp_gpe.h index 329083af631..cba779525a8 100644 --- a/vnet/vnet/lisp-gpe/lisp_gpe.h +++ b/vnet/vnet/lisp-gpe/lisp_gpe.h @@ -158,6 +158,7 @@ typedef struct lisp_gpe_main ip6_main_t * im6; ip_lookup_main_t * lm4; ip_lookup_main_t * lm6; + u8 is_en; } lisp_gpe_main_t; lisp_gpe_main_t lisp_gpe_main; @@ -195,6 +196,8 @@ typedef struct u32 vni; /* host byte order */ } vnet_lisp_gpe_add_del_iface_args_t; +u8 +vnet_lisp_gpe_enable_disable_status(void); void vnet_lisp_gpe_add_del_iface (vnet_lisp_gpe_add_del_iface_args_t *a, u32 * hw_if_indexp); |