From 14053c9dbd75182f5302f7388d17508f3930f7ce Mon Sep 17 00:00:00 2001 From: Neale Ranns Date: Sun, 29 Dec 2019 23:55:18 +0000 Subject: ipip: Multi-point interface Type: feature plus fixes for gre Signed-off-by: Neale Ranns Change-Id: I0eca5f94b8b8ea0fcfb058162cafea4491708db6 --- src/vnet/ipip/sixrd.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/vnet/ipip/sixrd.c') diff --git a/src/vnet/ipip/sixrd.c b/src/vnet/ipip/sixrd.c index 04df0eeabe5..492b4f83260 100644 --- a/src/vnet/ipip/sixrd.c +++ b/src/vnet/ipip/sixrd.c @@ -283,12 +283,10 @@ sixrd_add_tunnel (ip6_address_t * ip6_prefix, u8 ip6_prefix_len, ip46_address_t src = ip46_address_initializer, dst = ip46_address_initializer; ip_set (&src, ip4_src, true); - ipip_tunnel_key_t key = { - .transport = IPIP_TRANSPORT_IP4, - .fib_index = ip4_fib_index, - .src = src, - .dst = dst - }; + ipip_tunnel_key_t key; + + ipip_mk_key_i (IPIP_TRANSPORT_IP4, IPIP_MODE_6RD, &src, &dst, ip4_fib_index, + &key); t = ipip_tunnel_db_find (&key); if (t) @@ -377,6 +375,7 @@ sixrd_del_tunnel (u32 sw_if_index) { ipip_main_t *gm = &ipip_main; ipip_tunnel_t *t = ipip_tunnel_db_find_by_sw_if_index (sw_if_index); + ipip_tunnel_key_t key; if (!t) { @@ -408,7 +407,8 @@ sixrd_del_tunnel (u32 sw_if_index) gm->tunnel_index_by_sw_if_index[t->sw_if_index] = ~0; vnet_delete_hw_interface (vnet_get_main (), t->hw_if_index); - ipip_tunnel_db_remove (t); + ipip_mk_key (t, &key); + ipip_tunnel_db_remove (t, &key); pool_put (gm->tunnels, t); return 0; -- cgit 1.2.3-korg