aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFilip Tehlar <ftehlar@cisco.com>2017-01-18 14:07:03 +0100
committerDamjan Marion <dmarion.lists@gmail.com>2017-01-18 18:16:22 +0000
commit12713c70fc8c0a0aa92cdbc42c98bac8932f2d63 (patch)
treee47716428fee4476923a0bbcb107200e0f6fe704
parent1b3d4ded5f347916132a5a39664867bded834b78 (diff)
LISP: Fix fwd adding, VPP-607
Change-Id: Ie48209ba6d9aab0c5cfbd7b3cce4114cf88f952c Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
-rw-r--r--vnet/vnet/lisp-cp/control.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/vnet/vnet/lisp-cp/control.c b/vnet/vnet/lisp-cp/control.c
index ad7a570192d..acf5472a0fb 100644
--- a/vnet/vnet/lisp-cp/control.c
+++ b/vnet/vnet/lisp-cp/control.c
@@ -512,7 +512,12 @@ dp_add_fwd_entry (lisp_cp_main_t * lcm, u32 src_map_index, u32 dst_map_index)
pool_get (lcm->fwd_entry_pool, fe);
fe->locator_pairs = a->locator_pairs;
gid_address_copy (&fe->reid, &a->rmt_eid);
- gid_address_copy (&fe->leid, &a->lcl_eid);
+
+ if (is_src_dst)
+ gid_address_copy (&fe->leid, &a->lcl_eid);
+ else
+ gid_address_copy (&fe->leid, &src_map->eid);
+
fe->is_src_dst = is_src_dst;
hash_set (lcm->fwd_entry_by_mapping_index, dst_map_index,
fe - lcm->fwd_entry_pool);