summaryrefslogtreecommitdiffstats
path: root/src/vnet/vxlan/vxlan_api.c
diff options
context:
space:
mode:
authorJon Loeliger <jdl@netgate.com>2018-02-01 16:36:12 -0600
committerJohn Lo <loj@cisco.com>2018-02-07 19:24:56 +0000
commit3d460bd9bed8e1b77609ef404018ecfac7c29e9e (patch)
tree2d4d9f2058f6bb0c5ef8142432884a6333b05224 /src/vnet/vxlan/vxlan_api.c
parentfe99a7eeb996633051942b6555b4806592dd8ad0 (diff)
VXLAN: Allow user to specify a custom vxlan tunnel instance id.
If one is not selected by the user, the next available id will be allocated, thus maintaining backward compatibility. Change-Id: I4691ed0638b8072f9cfa9f20b9fe4f981e708800 Signed-off-by: Jon Loeliger <jdl@netgate.com>
Diffstat (limited to 'src/vnet/vxlan/vxlan_api.c')
-rw-r--r--src/vnet/vxlan/vxlan_api.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/vnet/vxlan/vxlan_api.c b/src/vnet/vxlan/vxlan_api.c
index 5c5e946343e..8b19c3a5c44 100644
--- a/src/vnet/vxlan/vxlan_api.c
+++ b/src/vnet/vxlan/vxlan_api.c
@@ -83,6 +83,7 @@ static void vl_api_vxlan_add_del_tunnel_t_handler
vnet_vxlan_add_del_tunnel_args_t a = {
.is_add = mp->is_add,
.is_ip6 = mp->is_ipv6,
+ .instance = ntohl (mp->instance),
.mcast_sw_if_index = ntohl (mp->mcast_sw_if_index),
.encap_fib_index = fib_index,
.decap_next_index = ntohl (mp->decap_next_index),
@@ -139,6 +140,8 @@ static void send_vxlan_tunnel_details
memcpy (rmp->dst_address, t->dst.ip4.as_u8, 4);
rmp->encap_vrf_id = htonl (im4->fibs[t->encap_fib_index].ft_table_id);
}
+
+ rmp->instance = htonl (t->user_instance);
rmp->mcast_sw_if_index = htonl (t->mcast_sw_if_index);
rmp->vni = htonl (t->vni);
rmp->decap_next_index = htonl (t->decap_next_index);