summaryrefslogtreecommitdiffstats
path: root/src/vnet/ipip/ipip.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/ipip/ipip.c')
-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));