summaryrefslogtreecommitdiffstats
path: root/src/vnet/ipip/sixrd.c
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2019-12-29 23:55:18 +0000
committerDamjan Marion <dmarion@me.com>2020-01-27 20:40:30 +0000
commit14053c9dbd75182f5302f7388d17508f3930f7ce (patch)
tree527f7675cfe18b13cc7c1923cd7959ec80459a7c /src/vnet/ipip/sixrd.c
parent59ff918ea5b86112ffc89054aa38107703354585 (diff)
ipip: Multi-point interface
Type: feature plus fixes for gre Signed-off-by: Neale Ranns <nranns@cisco.com> Change-Id: I0eca5f94b8b8ea0fcfb058162cafea4491708db6
Diffstat (limited to 'src/vnet/ipip/sixrd.c')
-rw-r--r--src/vnet/ipip/sixrd.c14
1 files changed, 7 insertions, 7 deletions
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;