From ccd83cb50194c6682a9c71b585d184c11ce11417 Mon Sep 17 00:00:00 2001 From: Andrew Yourtchenko Date: Thu, 15 Sep 2022 12:11:06 +0000 Subject: 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 --- src/plugins/lisp/lisp-cp/control.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/plugins/lisp') 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]); -- cgit 1.2.3-korg