summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Yourtchenko <ayourtch@gmail.com>2022-09-15 12:11:06 +0000
committerFlorin Coras <florin.coras@gmail.com>2022-09-18 23:19:16 +0000
commitccd83cb50194c6682a9c71b585d184c11ce11417 (patch)
tree4f72b5ebe748dcc898113d00131d84df7196b2db
parentdd0144a4563212e193b517d05b231350d58fa53e (diff)
lisp: fix coverity 277315
Handle the case of the mapping not being found by GID. Type: fix Change-Id: Ibce3b9e8419c0dddca97b4d0d5a71f25dfd529d8 Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
-rw-r--r--src/plugins/lisp/lisp-cp/control.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/lisp/lisp-cp/control.c b/src/plugins/lisp/lisp-cp/control.c
index 24dd50b7de0..4f5dc55d12c 100644
--- a/src/plugins/lisp/lisp-cp/control.c
+++ b/src/plugins/lisp/lisp-cp/control.c
@@ -4276,6 +4276,11 @@ process_map_request (vlib_main_t * vm, vlib_node_runtime_t * node,
rloc_probe_recv++;
clib_memset (&m, 0, sizeof (m));
u32 mi = gid_dictionary_lookup (&lcm->mapping_index_by_gid, &dst);
+ if (GID_LOOKUP_MISS == mi)
+ {
+ clib_warning ("Cannot find mapping index by gid!");
+ continue;
+ }
// TODO: select best locator; for now use the first one
dst_loc = &gid_address_ip (&itr_rlocs[0]);