aboutsummaryrefslogtreecommitdiffstats
path: root/src/vat
diff options
context:
space:
mode:
authorKingwel Xie <kingwel.xie@ericsson.com>2019-03-20 07:21:58 -0400
committerNeale Ranns <nranns@cisco.com>2019-03-21 07:42:09 +0000
commit1ba5bc8d888d0164dd6e38857cbed09ab7ce1d8b (patch)
treeea87c57b0db7f981878e2cdb66f7f650cbc71447 /src/vat
parenta5efca30f569ff93cfb85ed1bc7742cee824426d (diff)
ipsec: add ipv6 support for ipsec tunnel interface
Change-Id: I6a76907dc7bed2a81282b63669bea2219d6903c9 Signed-off-by: Kingwel Xie <kingwel.xie@ericsson.com> Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Diffstat (limited to 'src/vat')
-rw-r--r--src/vat/api_format.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/vat/api_format.c b/src/vat/api_format.c
index cef60e05725..46974d2d299 100644
--- a/src/vat/api_format.c
+++ b/src/vat/api_format.c
@@ -15028,8 +15028,8 @@ api_ipsec_tunnel_if_add_del (vat_main_t * vam)
u32 crypto_alg = 0, integ_alg = 0;
u8 *lck = NULL, *rck = NULL;
u8 *lik = NULL, *rik = NULL;
- ip4_address_t local_ip = { {0} };
- ip4_address_t remote_ip = { {0} };
+ vl_api_address_t local_ip = { 0 };
+ vl_api_address_t remote_ip = { 0 };
u8 is_add = 1;
u8 esn = 0;
u8 anti_replay = 0;
@@ -15049,9 +15049,11 @@ api_ipsec_tunnel_if_add_del (vat_main_t * vam)
;
else if (unformat (i, "remote_spi %d", &remote_spi))
;
- else if (unformat (i, "local_ip %U", unformat_ip4_address, &local_ip))
+ else
+ if (unformat (i, "local_ip %U", unformat_vl_api_address, &local_ip))
;
- else if (unformat (i, "remote_ip %U", unformat_ip4_address, &remote_ip))
+ else
+ if (unformat (i, "remote_ip %U", unformat_vl_api_address, &remote_ip))
;
else if (unformat (i, "local_crypto_key %U", unformat_hex_string, &lck))
;
@@ -15099,8 +15101,8 @@ api_ipsec_tunnel_if_add_del (vat_main_t * vam)
mp->esn = esn;
mp->anti_replay = anti_replay;
- clib_memcpy (mp->local_ip, &local_ip, sizeof (ip4_address_t));
- clib_memcpy (mp->remote_ip, &remote_ip, sizeof (ip4_address_t));
+ clib_memcpy (&mp->local_ip, &local_ip, sizeof (local_ip));
+ clib_memcpy (&mp->remote_ip, &remote_ip, sizeof (remote_ip));
mp->local_spi = htonl (local_spi);
mp->remote_spi = htonl (remote_spi);