aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/ipip
diff options
context:
space:
mode:
authorFilip Tehlar <ftehlar@cisco.com>2019-11-30 20:49:40 +0000
committerDamjan Marion <dmarion@me.com>2019-12-12 23:01:10 +0000
commit4c6b1b6da5d884c80363aeba75bc318a06e29031 (patch)
treead9ea0a501983a381a981abfd381b1e22da22ce9 /src/vnet/ipip
parent64cf459bc9353935a72c3e37892b7b7444029795 (diff)
ikev2: fix crash during SA rekey
Type: fix Change-Id: Ib00ab9b2f28c0f4d85e96bf95697f61b8e415f37 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Diffstat (limited to 'src/vnet/ipip')
-rw-r--r--src/vnet/ipip/ipip.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/vnet/ipip/ipip.c b/src/vnet/ipip/ipip.c
index fc71b5b76df..d68e8152972 100644
--- a/src/vnet/ipip/ipip.c
+++ b/src/vnet/ipip/ipip.c
@@ -430,7 +430,11 @@ ipip_add_tunnel (ipip_transport_t transport,
};
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));