aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
authorHongjun Ni <hongjun.ni@intel.com>2017-06-23 00:18:40 +0800
committerNeale Ranns <nranns@cisco.com>2017-06-25 08:52:10 +0000
commit4857f00a5f9308c561bd00c185438e031df0c527 (patch)
treecb3435607faa2793b70dc1a1360f4424a65057ec /src/vnet
parentea89b8cf66257d9eef470bd353eb41ea438ac34c (diff)
VPP crash on creating vxlan gpe interface. VPP-875
Change-Id: I6b19634ecb03860a7624d9408e09b52e95f47aef Signed-off-by: Hongjun Ni <hongjun.ni@intel.com> (cherry picked from commit 04ffd0ad83b2d87edb669a9d76eee85f5c589564)
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/vxlan-gpe/vxlan_gpe.api1
-rw-r--r--src/vnet/vxlan-gpe/vxlan_gpe.c3
-rw-r--r--src/vnet/vxlan-gpe/vxlan_gpe_api.c13
3 files changed, 11 insertions, 6 deletions
diff --git a/src/vnet/vxlan-gpe/vxlan_gpe.api b/src/vnet/vxlan-gpe/vxlan_gpe.api
index 41b10316451..04082d69c65 100644
--- a/src/vnet/vxlan-gpe/vxlan_gpe.api
+++ b/src/vnet/vxlan-gpe/vxlan_gpe.api
@@ -53,7 +53,6 @@ define vxlan_gpe_tunnel_details
u32 mcast_sw_if_index;
u32 encap_vrf_id;
u32 decap_vrf_id;
-
u8 is_ipv6;
};
diff --git a/src/vnet/vxlan-gpe/vxlan_gpe.c b/src/vnet/vxlan-gpe/vxlan_gpe.c
index 3a92c88fbb6..fab887addff 100644
--- a/src/vnet/vxlan-gpe/vxlan_gpe.c
+++ b/src/vnet/vxlan-gpe/vxlan_gpe.c
@@ -83,6 +83,9 @@ u8 * format_vxlan_gpe_tunnel (u8 * s, va_list * args)
s = format (s, "next-protocol unknown %d", t->protocol);
}
+ if (ip46_address_is_multicast (&t->remote))
+ s = format (s, "mcast_sw_if_index %d ", t->mcast_sw_if_index);
+
s = format (s, " fibs: (encap %d, decap %d)",
t->encap_fib_index,
t->decap_fib_index);
diff --git a/src/vnet/vxlan-gpe/vxlan_gpe_api.c b/src/vnet/vxlan-gpe/vxlan_gpe_api.c
index 3675fc55cd8..8e2684187a7 100644
--- a/src/vnet/vxlan-gpe/vxlan_gpe_api.c
+++ b/src/vnet/vxlan-gpe/vxlan_gpe_api.c
@@ -47,7 +47,7 @@
#define foreach_vpe_api_msg \
_(SW_INTERFACE_SET_VXLAN_GPE_BYPASS, sw_interface_set_vxlan_gpe_bypass) \
_(VXLAN_GPE_ADD_DEL_TUNNEL, vxlan_gpe_add_del_tunnel) \
-_(VXLAN_GPE_TUNNEL_DUMP, vxlan_gpe_tunnel_dump) \
+_(VXLAN_GPE_TUNNEL_DUMP, vxlan_gpe_tunnel_dump)
static void
vl_api_sw_interface_set_vxlan_gpe_bypass_t_handler
@@ -156,15 +156,15 @@ static void send_vxlan_gpe_tunnel_details
rmp->_vl_msg_id = ntohs (VL_API_VXLAN_GPE_TUNNEL_DETAILS);
if (is_ipv6)
{
- memcpy (rmp->local, &(t->local.ip6), 16);
- memcpy (rmp->remote, &(t->remote.ip6), 16);
+ memcpy (rmp->local, &(t->local.ip6.as_u8), 16);
+ memcpy (rmp->remote, &(t->remote.ip6.as_u8), 16);
rmp->encap_vrf_id = htonl (im6->fibs[t->encap_fib_index].ft_table_id);
rmp->decap_vrf_id = htonl (im6->fibs[t->decap_fib_index].ft_table_id);
}
else
{
- memcpy (rmp->local, &(t->local.ip4), 4);
- memcpy (rmp->remote, &(t->remote.ip4), 4);
+ memcpy (rmp->local, &(t->local.ip4.as_u8), 4);
+ memcpy (rmp->remote, &(t->remote.ip4.as_u8), 4);
rmp->encap_vrf_id = htonl (im4->fibs[t->encap_fib_index].ft_table_id);
rmp->decap_vrf_id = htonl (im4->fibs[t->decap_fib_index].ft_table_id);
}
@@ -250,6 +250,9 @@ vxlan_gpe_api_hookup (vlib_main_t * vm)
foreach_vpe_api_msg;
#undef _
+ am->api_trace_cfg[VL_API_VXLAN_GPE_ADD_DEL_TUNNEL].size +=
+ 17 * sizeof (u32);
+
/*
* Set up the (msg_name, crc, message-id) table
*/