aboutsummaryrefslogtreecommitdiffstats
path: root/hicn-plugin/src/mapme_eventmgr.c
diff options
context:
space:
mode:
authorAlberto Compagno <acompagn+fdio@cisco.com>2020-01-21 15:38:45 +0000
committerGerrit Code Review <gerrit@fd.io>2020-01-21 15:38:45 +0000
commit50bedb707155de675121a556a8b129280440cdf5 (patch)
treea21b90b2a3178429330ff461a4ca2ae2d8bcfe9b /hicn-plugin/src/mapme_eventmgr.c
parent43980f3096655df2b2ecec50e700dd6989b0e0d6 (diff)
parentf2de2bfea184034f675ab4a521e7deaae58c5ff8 (diff)
Merge "[HICN-477] Fixed strategy get ctx that could lead to a segfault"
Diffstat (limited to 'hicn-plugin/src/mapme_eventmgr.c')
-rw-r--r--hicn-plugin/src/mapme_eventmgr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hicn-plugin/src/mapme_eventmgr.c b/hicn-plugin/src/mapme_eventmgr.c
index 93168d059..ef73f9550 100644
--- a/hicn-plugin/src/mapme_eventmgr.c
+++ b/hicn-plugin/src/mapme_eventmgr.c
@@ -283,13 +283,14 @@ hicn_mapme_send_updates (vlib_main_t * vm, hicn_prefix_t * prefix,
{
const hicn_dpo_vft_t *dpo_vft = hicn_dpo_get_vft (dpo.dpoi_type);
hicn_mapme_tfib_t *tfib = TFIB (dpo_vft->hicn_dpo_get_ctx (dpo.dpoi_index));
- u8 tfib_last_idx = HICN_PARAM_FIB_ENTRY_NHOPS_MAX - tfib->tfib_entry_count;
if (!tfib)
{
DEBUG ("NULL TFIB entry id=%d", dpo.dpoi_index);
return;
}
+ u8 tfib_last_idx = HICN_PARAM_FIB_ENTRY_NHOPS_MAX - tfib->tfib_entry_count;
+
mapme_params_t params = {
.protocol = ip46_address_is_ip4 (&prefix->name)
? IPPROTO_IP : IPPROTO_IPV6,