diff options
author | Ole Troan <ot@cisco.com> | 2019-03-11 09:47:31 +0100 |
---|---|---|
committer | Neale Ranns <nranns@cisco.com> | 2019-03-11 09:41:13 +0000 |
commit | 0c656748ad729267314acbf05427de8dc2dfca95 (patch) | |
tree | 1c466498e10d316c57fc77b9d21bc26a8381802e /src | |
parent | 22ab6f7cbb0f6139302aa6ca9f0c96dba17a37a7 (diff) |
VPP-1533: Deleting a non-existent pre-resolved MAP next-hop causes VPP core dump
Change-Id: I6f0830b786ac46c69c867f73b044aab174e6210b
Signed-off-by: Ole Troan <ot@cisco.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/map/map.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/plugins/map/map.c b/src/plugins/map/map.c index 2f13336b568..d77b141593b 100644 --- a/src/plugins/map/map.c +++ b/src/plugins/map/map.c @@ -229,7 +229,7 @@ map_add_del_psid (u32 map_domain_index, u16 psid, ip6_address_t * tep, #ifdef MAP_SKIP_IP6_LOOKUP /** - * Pre-resolvd per-protocol global next-hops + * Pre-resolved per-protocol global next-hops */ map_main_pre_resolved_t pre_resolved[FIB_PROTOCOL_MAX]; @@ -351,14 +351,17 @@ map_fib_unresolve (map_main_pre_resolved_t * pr, .fp_addr = *addr, }; - fib_entry_child_remove (pr->fei, pr->sibling); + if (pr->fei != FIB_NODE_INDEX_INVALID) + { + fib_entry_child_remove (pr->fei, pr->sibling); - fib_table_entry_special_remove (0, // default fib - &pfx, FIB_SOURCE_RR); - dpo_reset (&pr->dpo); + fib_table_entry_special_remove (0, // default fib + &pfx, FIB_SOURCE_RR); + dpo_reset (&pr->dpo); - pr->fei = FIB_NODE_INDEX_INVALID; - pr->sibling = FIB_NODE_INDEX_INVALID; + pr->fei = FIB_NODE_INDEX_INVALID; + pr->sibling = FIB_NODE_INDEX_INVALID; + } } void |