ikev2: fix crash during SA rekey
Type: fix
Change-Id: Ib00ab9b2f28c0f4d85e96bf95697f61b8e415f37
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
diff --git a/src/vnet/ipip/ipip.c b/src/vnet/ipip/ipip.c
index fc71b5b..d68e815 100644
--- a/src/vnet/ipip/ipip.c
+++ b/src/vnet/ipip/ipip.c
@@ -430,7 +430,11 @@
};
t = ipip_tunnel_db_find (&key);
if (t)
- return VNET_API_ERROR_IF_ALREADY_EXISTS;
+ {
+ if (sw_if_indexp)
+ sw_if_indexp[0] = t->sw_if_index;
+ return VNET_API_ERROR_IF_ALREADY_EXISTS;
+ }
pool_get_aligned (gm->tunnels, t, CLIB_CACHE_LINE_BYTES);
clib_memset (t, 0, sizeof (*t));