diff options
author | 2016-10-04 18:03:49 +0300 | |
---|---|---|
committer | 2016-10-04 23:06:33 +0000 | |
commit | 2ccf768f13991344abd1306fe529ccc4997c1481 (patch) | |
tree | 1274772f34a8d9f7f1e398acf2630870baee4a55 /vnet | |
parent | 95300d19152877dca8dfbd574dc6da50620125e8 (diff) |
Fix LISP L2 fwd entry updates
Change-Id: I554041bf47aa82dd6f6e0563c68d8bbd3b18b255
Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'vnet')
-rw-r--r-- | vnet/vnet/lisp-gpe/lisp_gpe_fwd_entry.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/vnet/vnet/lisp-gpe/lisp_gpe_fwd_entry.c b/vnet/vnet/lisp-gpe/lisp_gpe_fwd_entry.c index 80710cdd..3bd83dca 100644 --- a/vnet/vnet/lisp-gpe/lisp_gpe_fwd_entry.c +++ b/vnet/vnet/lisp-gpe/lisp_gpe_fwd_entry.c @@ -617,17 +617,20 @@ del_l2_fwd_entry_i (lisp_gpe_main_t * lgm, lisp_gpe_fwd_entry_t * lfe) { lisp_fwd_path_t *path; - vec_foreach (path, lfe->paths) - { - lisp_gpe_adjacency_unlock (path->lisp_adj); - } + if (LISP_GPE_FWD_ENTRY_TYPE_NEGATIVE != lfe->type) + { + vec_foreach (path, lfe->paths) + { + lisp_gpe_adjacency_unlock (path->lisp_adj); + } + fib_path_list_child_remove (lfe->l2.path_list_index, + lfe->l2.child_index); + } lisp_l2_fib_add_del_entry (lfe->l2.eid_bd_index, fid_addr_mac (&lfe->key->lcl), fid_addr_mac (&lfe->key->rmt), NULL, 0); - fib_path_list_child_remove (lfe->l2.path_list_index, lfe->l2.child_index); - hash_unset_mem (lgm->lisp_gpe_fwd_entries, lfe->key); clib_mem_free (lfe->key); pool_put (lgm->lisp_fwd_entry_pool, lfe); @@ -652,7 +655,7 @@ del_l2_fwd_entry (lisp_gpe_main_t * lgm, lfe = find_fwd_entry (lgm, a, &key); - if (NULL != lfe) + if (NULL == lfe) return VNET_API_ERROR_INVALID_VALUE; del_l2_fwd_entry_i (lgm, lfe); |