diff options
author | Neale Ranns <nranns@cisco.com> | 2019-12-31 05:13:14 +0000 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2020-01-30 20:12:19 +0000 |
commit | e5b94dded0dfd7258d5fd0f4ef897d9ccb48715b (patch) | |
tree | 819c62a17acf0b234a76c8eef2f00e944e1da8b3 /src/vnet/gre/gre_api.c | |
parent | 9ace36d0f9b04e2d4db410607ee33a8e72ef00c5 (diff) |
gre: Tunnel encap/decap flags
Type: feature
common funcitons across IP-in-IP and GRE tunnels for encap/decap
functions
Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: I325b66824878d843af167adfe5a7a96b0ab90566
Diffstat (limited to 'src/vnet/gre/gre_api.c')
-rw-r--r-- | src/vnet/gre/gre_api.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/vnet/gre/gre_api.c b/src/vnet/gre/gre_api.c index 619b5fc233c..934fc661b47 100644 --- a/src/vnet/gre/gre_api.c +++ b/src/vnet/gre/gre_api.c @@ -89,6 +89,7 @@ static void vl_api_gre_tunnel_add_del_t_handler { vnet_gre_tunnel_add_del_args_t _a = { }, *a = &_a; vl_api_gre_tunnel_add_del_reply_t *rmp; + tunnel_encap_decap_flags_t flags; u32 sw_if_index = ~0; ip46_type_t itype[2]; int rv = 0; @@ -118,11 +119,17 @@ static void vl_api_gre_tunnel_add_del_t_handler if (rv) goto out; + rv = tunnel_encap_decap_flags_decode (mp->tunnel.flags, &flags); + + if (rv) + goto out; + a->is_add = mp->is_add; a->is_ipv6 = (itype[0] == IP46_TYPE_IP6); a->instance = ntohl (mp->tunnel.instance); a->session_id = ntohs (mp->tunnel.session_id); a->outer_table_id = ntohl (mp->tunnel.outer_table_id); + a->flags = flags; rv = vnet_gre_tunnel_add_del (a, &sw_if_index); |