X-Git-Url: https://gerrit.fd.io/r/gitweb?p=vpp.git;a=blobdiff_plain;f=src%2Fvnet%2Fgre%2Fgre_api.c;h=934fc661b47b208f94019695a62a8f1a5eba8210;hp=619b5fc233cdfb13d7856622f3487efa6b9b2b5e;hb=e5b94dded;hpb=9ace36d0f9b04e2d4db410607ee33a8e72ef00c5 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; @@ -115,6 +116,11 @@ static void vl_api_gre_tunnel_add_del_t_handler rv = tunnel_mode_decode (mp->tunnel.mode, &a->mode); + if (rv) + goto out; + + rv = tunnel_encap_decap_flags_decode (mp->tunnel.flags, &flags); + if (rv) goto out; @@ -123,6 +129,7 @@ static void vl_api_gre_tunnel_add_del_t_handler 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);