X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=vnet%2Fvnet%2Flisp-cp%2Fcontrol.c;h=fb4c8397d2dff0650d23d8e2bd612ecd82107d40;hb=a8691754d2f7cdd960c3d8dc5fbff6367e9c36b8;hp=78e730f5a5d34312e6c60021977a9dbbc3dbc481;hpb=683d3ee1b136060ef38290b6ab3a21c9a4730c4f;p=vpp.git diff --git a/vnet/vnet/lisp-cp/control.c b/vnet/vnet/lisp-cp/control.c index 78e730f5a5d..fb4c8397d2d 100644 --- a/vnet/vnet/lisp-cp/control.c +++ b/vnet/vnet/lisp-cp/control.c @@ -1562,8 +1562,8 @@ is_locator_in_locator_set (lisp_cp_main_t * lcm, locator_set_t * ls, vec_foreach(locit, ls->locator_indices) { itloc = pool_elt_at_index(lcm->locator_pool, locit[0]); - if (itloc->sw_if_index == loc->sw_if_index || - !gid_address_cmp(&itloc->address, &loc->address)) + if ((ls->local && itloc->sw_if_index == loc->sw_if_index) || + (!ls->local && !gid_address_cmp(&itloc->address, &loc->address))) { clib_warning("Duplicate locator"); return VNET_API_ERROR_VALUE_EXIST; @@ -2099,7 +2099,14 @@ lisp_cp_show_locator_sets_command_fn (vlib_main_t * vm, ({ u8 * msg = 0; int next_line = 0; - msg = format (msg, "%=16v", lsit->name); + if (lsit->local) + { + msg = format (msg, "%=16v", lsit->name); + } + else + { + msg = format (msg, "%=16s", "remote"); + } vec_foreach (locit, lsit->locator_indices) { if (next_line)