diff options
author | Matthew Smith <mgsmith@netgate.com> | 2017-05-14 21:47:18 -0500 |
---|---|---|
committer | Neale Ranns <nranns@cisco.com> | 2017-05-15 20:49:05 +0000 |
commit | e04d09de8433213f3c3e8cdc5acaa7e2289d92de (patch) | |
tree | 17e444800a9fb647d1a5490e6d5cd84da86b1051 /src/vnet/ipsec/ipsec_api.c | |
parent | 5c85f358bb08403d9edce14d9cc63675bda6799d (diff) |
Add sw_if_index of tunnel interface to API reply for ipsec_tunnel_if_add_del
Change-Id: If5158f6fa7344dee94548c93dace779430e0647f
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
Diffstat (limited to 'src/vnet/ipsec/ipsec_api.c')
-rw-r--r-- | src/vnet/ipsec/ipsec_api.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/vnet/ipsec/ipsec_api.c b/src/vnet/ipsec/ipsec_api.c index 04dff4d0fd0..3a5b89feb7d 100644 --- a/src/vnet/ipsec/ipsec_api.c +++ b/src/vnet/ipsec/ipsec_api.c @@ -357,6 +357,9 @@ vl_api_ipsec_tunnel_if_add_del_t_handler (vl_api_ipsec_tunnel_if_add_del_t * mp) { vl_api_ipsec_tunnel_if_add_del_reply_t *rmp; + ipsec_main_t *im = &ipsec_main; + vnet_main_t *vnm = im->vnet_main; + u32 sw_if_index = ~0; int rv; #if WITH_LIBSSL > 0 @@ -386,15 +389,20 @@ vl_api_ipsec_tunnel_if_add_del_t_handler (vl_api_ipsec_tunnel_if_add_del_t * memcpy (&tun.remote_integ_key, &mp->remote_integ_key, mp->remote_integ_key_len); - rv = ipsec_add_del_tunnel_if (&tun); + rv = ipsec_add_del_tunnel_if_internal (vnm, &tun, &sw_if_index); #else rv = VNET_API_ERROR_UNIMPLEMENTED; #endif - REPLY_MACRO (VL_API_IPSEC_TUNNEL_IF_ADD_DEL_REPLY); + REPLY_MACRO2 (VL_API_IPSEC_TUNNEL_IF_ADD_DEL_REPLY, ( + { + rmp->sw_if_index = + htonl (sw_if_index); + })); } + static void vl_api_ikev2_profile_add_del_t_handler (vl_api_ikev2_profile_add_del_t * mp) { |