summaryrefslogtreecommitdiffstats
path: root/src/vnet/lisp-cp/one_cli.c
diff options
context:
space:
mode:
authorFilip Tehlar <ftehlar@cisco.com>2017-10-26 23:57:09 -0700
committerFlorin Coras <florin.coras@gmail.com>2017-10-30 14:36:50 +0000
commit9d286a47017c3cb641e62586929ec4dbac04a2d4 (patch)
treeaa6f22e0cfdee08302cfd1e5662498944a463cec /src/vnet/lisp-cp/one_cli.c
parent7008da2667d2876bc58aa5ae57c4a9de48cc756b (diff)
LISP: improve updating the dataplne when locators change
Change-Id: Ifc0296834e25ddbdd0ad8283c061f309801b053c Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Diffstat (limited to 'src/vnet/lisp-cp/one_cli.c')
-rw-r--r--src/vnet/lisp-cp/one_cli.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/vnet/lisp-cp/one_cli.c b/src/vnet/lisp-cp/one_cli.c
index 700bfd66e7a..3b6d1b448af 100644
--- a/src/vnet/lisp-cp/one_cli.c
+++ b/src/vnet/lisp-cp/one_cli.c
@@ -168,6 +168,7 @@ lisp_add_del_local_eid_command_fn (vlib_main_t * vm, unformat_input_t * input,
;
else if (unformat (line_input, "locator-set %_%v%_", &locator_set_name))
{
+ vec_terminate_c_string (locator_set_name);
p = hash_get_mem (lcm->locator_set_index_by_name, locator_set_name);
if (!p)
{
@@ -867,6 +868,7 @@ lisp_nsh_set_locator_set_command_fn (vlib_main_t * vm,
goto done;
}
+ vec_terminate_c_string (locator_set_name);
rv = vnet_lisp_nsh_set_locator_set (locator_set_name, is_add);
if (0 != rv)
{
@@ -987,6 +989,7 @@ lisp_pitr_set_locator_set_command_fn (vlib_main_t * vm,
clib_warning ("No locator set specified!");
goto done;
}
+ vec_terminate_c_string (locator_set_name);
rv = vnet_lisp_pitr_set_locator_set (locator_set_name, is_add);
if (0 != rv)
{
@@ -1566,6 +1569,7 @@ lisp_add_del_locator_set_command_fn (vlib_main_t * vm,
}
}
+ vec_terminate_c_string (locator_set_name);
a->name = locator_set_name;
a->locators = locators;
a->is_add = is_add;
@@ -1647,6 +1651,7 @@ lisp_add_del_locator_in_set_command_fn (vlib_main_t * vm,
goto done;
}
+ vec_terminate_c_string (locator_set_name);
a->name = locator_set_name;
a->locators = locators;
a->is_add = is_add;
@@ -1690,7 +1695,7 @@ lisp_cp_show_locator_sets_command_fn (vlib_main_t * vm,
int next_line = 0;
if (lsit->local)
{
- msg = format (msg, "%v", lsit->name);
+ msg = format (msg, "%s", lsit->name);
}
else
{
@@ -1817,6 +1822,7 @@ lisp_add_del_mreq_itr_rlocs_command_fn (vlib_main_t * vm,
}
}
+ vec_terminate_c_string (locator_set_name);
a->is_add = is_add;
a->locator_set_name = locator_set_name;
rv = vnet_lisp_add_del_mreq_itr_rlocs (a);