summaryrefslogtreecommitdiffstats
path: root/src/vnet/lisp-cp/one_api.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_api.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_api.c')
-rw-r--r--src/vnet/lisp-cp/one_api.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/vnet/lisp-cp/one_api.c b/src/vnet/lisp-cp/one_api.c
index c9b5dca3aff..33b3a47a352 100644
--- a/src/vnet/lisp-cp/one_api.c
+++ b/src/vnet/lisp-cp/one_api.c
@@ -202,6 +202,7 @@ vl_api_one_add_del_locator_set_t_handler (vl_api_one_add_del_locator_set_t *
memset (a, 0, sizeof (a[0]));
+ mp->locator_set_name[sizeof (mp->locator_set_name) - 1] = 0;
locator_name = format (0, "%s", mp->locator_set_name);
vec_terminate_c_string (locator_name);
@@ -257,6 +258,7 @@ vl_api_one_add_del_locator_t_handler (vl_api_one_add_del_locator_t * mp)
locator.local = 1;
vec_add1 (locators, locator);
+ mp->locator_set_name[sizeof (mp->locator_set_name) - 1] = 0;
locator_name = format (0, "%s", mp->locator_set_name);
vec_terminate_c_string (locator_name);
@@ -344,6 +346,7 @@ vl_api_one_add_del_local_eid_t_handler (vl_api_one_add_del_local_eid_t * mp)
goto out;
}
+ mp->locator_set_name[sizeof (mp->locator_set_name) - 1] = 0;
name = format (0, "%s", mp->locator_set_name);
vec_terminate_c_string (name);
p = hash_get_mem (lcm->locator_set_index_by_name, name);
@@ -485,6 +488,7 @@ vl_api_one_nsh_set_locator_set_t_handler (vl_api_one_nsh_set_locator_set_t
int rv = 0;
u8 *ls_name = 0;
+ mp->ls_name[sizeof (mp->ls_name) - 1] = 0;
ls_name = format (0, "%s", mp->ls_name);
vec_terminate_c_string (ls_name);
rv = vnet_lisp_nsh_set_locator_set (ls_name, mp->is_add);
@@ -501,6 +505,7 @@ vl_api_one_pitr_set_locator_set_t_handler (vl_api_one_pitr_set_locator_set_t
int rv = 0;
u8 *ls_name = 0;
+ mp->ls_name[sizeof (mp->ls_name) - 1] = 0;
ls_name = format (0, "%s", mp->ls_name);
vec_terminate_c_string (ls_name);
rv = vnet_lisp_pitr_set_locator_set (ls_name, mp->is_add);
@@ -589,6 +594,7 @@ static void
u8 *locator_set_name = NULL;
vnet_lisp_add_del_mreq_itr_rloc_args_t _a, *a = &_a;
+ mp->locator_set_name[sizeof (mp->locator_set_name) - 1] = 0;
locator_set_name = format (0, "%s", mp->locator_set_name);
vec_terminate_c_string (locator_set_name);