aboutsummaryrefslogtreecommitdiffstats
path: root/vpp
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2016-04-26 00:17:24 +0200
committerDave Barach <openvpp@barachs.net>2016-04-29 12:01:15 +0000
commit02655bd425cc596960b7efc74d1fbad3b3406419 (patch)
treecf840b76a83e27574f97d67ca4a1d22ea7290e53 /vpp
parent848191d3e1b1b2febb1f67e5121487f871e67b56 (diff)
Add lisp-gpe ip6 data-plane support
The implementation mimics that of the ip4 data-plane. Therefore, a new lgpe-ip6-lookup lookup node is introduced for ip6 source lookups, a lisp-gpe-ip6-input node for decapsulating ip6 encapsulated packets and the tx function of the lisp-gpe interface is updated to support any mix of v4 and v6 in underlay and overlay. Change-Id: Ib3a6e339b8cd7618a940acf0dd8e61c042fd83dd Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'vpp')
-rw-r--r--vpp/api/api.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/vpp/api/api.c b/vpp/api/api.c
index 1b6d52be..bc2f64cd 100644
--- a/vpp/api/api.c
+++ b/vpp/api/api.c
@@ -4860,7 +4860,6 @@ send_lisp_gpe_tunnel_details (lisp_gpe_tunnel_t *tunnel,
{
vl_api_lisp_gpe_tunnel_details_t *rmp;
lisp_gpe_main_t * lgm = &lisp_gpe_main;
- ip4_address_t *ip4 = NULL;
rmp = vl_msg_api_alloc (sizeof (*rmp));
memset (rmp, 0, sizeof (*rmp));
@@ -4868,12 +4867,9 @@ send_lisp_gpe_tunnel_details (lisp_gpe_tunnel_t *tunnel,
rmp->tunnels = tunnel - lgm->tunnels;
- /*list_gpe_tunnel now support only IPv4*/
- rmp->is_ipv6 = 0;
- ip4 = &tunnel->src;
- clib_memcpy(rmp->source_ip, ip4, sizeof(*ip4));
- ip4 = &tunnel->dst;
- clib_memcpy(rmp->destination_ip, ip4, sizeof(*ip4));
+ rmp->is_ipv6 = ip_addr_version(&tunnel->src) == IP6 ? 1 : 0;
+ ip_address_copy_addr(rmp->source_ip, &tunnel->src);
+ ip_address_copy_addr(rmp->destination_ip, &tunnel->dst);
rmp->encap_fib_id = htonl(tunnel->encap_fib_index);
rmp->decap_fib_id = htonl(tunnel->decap_fib_index);