X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Flisp-cp%2Fcontrol.c;h=c7853ca73fb32f208c9aacff74c74f19d8d30949;hb=7eaf0e57415615b56904e0054bf0b856db6f9bc1;hp=66b560e4ab0eddf045b96211dcae528877f629ba;hpb=272c69eb0d8a0ef000ef6d94ee38bdd8009b13ed;p=vpp.git diff --git a/src/vnet/lisp-cp/control.c b/src/vnet/lisp-cp/control.c index 66b560e4ab0..c7853ca73fb 100644 --- a/src/vnet/lisp-cp/control.c +++ b/src/vnet/lisp-cp/control.c @@ -1301,6 +1301,7 @@ vnet_lisp_pitr_set_locator_set (u8 * locator_set_name, u8 is_add) pool_get (lcm->mapping_pool, m); m->locator_set_index = locator_set_index; m->local = 1; + m->pitr_set = 1; lcm->pitr_map_index = m - lcm->mapping_pool; /* enable pitr mode */ @@ -3800,6 +3801,29 @@ send_map_resolver_service (vlib_main_t * vm, return 0; } +vnet_api_error_t +vnet_lisp_stats_enable_disable (u8 enable) +{ + lisp_cp_main_t *lcm = vnet_lisp_cp_get_main (); + + if (vnet_lisp_enable_disable_status () == 0) + return VNET_API_ERROR_LISP_DISABLED; + + lcm->stats_enabled = enable; + return 0; +} + +u8 +vnet_lisp_stats_enable_disable_state (void) +{ + lisp_cp_main_t *lcm = vnet_lisp_cp_get_main (); + + if (vnet_lisp_enable_disable_status () == 0) + return VNET_API_ERROR_LISP_DISABLED; + + return lcm->stats_enabled; +} + /* *INDENT-OFF* */ VLIB_REGISTER_NODE (lisp_retry_service_node,static) = { .function = send_map_resolver_service,