summaryrefslogtreecommitdiffstats
path: root/src/vnet/ipip/ipip_api.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/ipip_api.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/ipip_api.c')
-rw-r--r--src/vnet/ipip/ipip_api.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/vnet/ipip/ipip_api.c b/src/vnet/ipip/ipip_api.c
index 4f6aa7f3dbe..97fff156d35 100644
--- a/src/vnet/ipip/ipip_api.c
+++ b/src/vnet/ipip/ipip_api.c
@@ -40,6 +40,7 @@ vl_api_ipip_add_tunnel_t_handler (vl_api_ipip_add_tunnel_t * mp)
tunnel_encap_decap_flags_t flags;
ip46_address_t src, dst;
ip46_type_t itype[2];
+ tunnel_mode_t mode;
itype[0] = ip_address_decode (&mp->tunnel.src, &src);
itype[1] = ip_address_decode (&mp->tunnel.dst, &dst);
@@ -61,6 +62,11 @@ vl_api_ipip_add_tunnel_t_handler (vl_api_ipip_add_tunnel_t * mp)
if (rv)
goto out;
+ rv = tunnel_mode_decode (mp->tunnel.mode, &mode);
+
+ if (rv)
+ goto out;
+
fib_index = fib_table_find (fib_proto_from_ip46 (itype[0]),
ntohl (mp->tunnel.table_id));
@@ -75,7 +81,8 @@ vl_api_ipip_add_tunnel_t_handler (vl_api_ipip_add_tunnel_t * mp)
IPIP_TRANSPORT_IP4),
ntohl (mp->tunnel.instance), &src, &dst,
fib_index, flags,
- ip_dscp_decode (mp->tunnel.dscp), &sw_if_index);
+ ip_dscp_decode (mp->tunnel.dscp), mode,
+ &sw_if_index);
}
out: