aboutsummaryrefslogtreecommitdiffstats
path: root/src/vpp/api/custom_dump.c
diff options
context:
space:
mode:
authorHongjun Ni <hongjun.ni@intel.com>2017-06-23 00:18:40 +0800
committerDamjan Marion <dmarion.lists@gmail.com>2017-06-25 08:09:29 +0000
commit04ffd0ad83b2d87edb669a9d76eee85f5c589564 (patch)
treef4d46fbf4595af839e8ff4e90bcf0bb9b10e81aa /src/vpp/api/custom_dump.c
parentfcfa38d68007418d9460533d248adf34aca88ec1 (diff)
VPP crash on creating vxlan gpe interface. VPP-875
Change-Id: I6b19634ecb03860a7624d9408e09b52e95f47aef Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
Diffstat (limited to 'src/vpp/api/custom_dump.c')
-rw-r--r--src/vpp/api/custom_dump.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/vpp/api/custom_dump.c b/src/vpp/api/custom_dump.c
index dc9fee9a..3ac8874e 100644
--- a/src/vpp/api/custom_dump.c
+++ b/src/vpp/api/custom_dump.c
@@ -1703,10 +1703,18 @@ static void *vl_api_vxlan_gpe_add_del_tunnel_t_print
s = format (0, "SCRIPT: vxlan_gpe_add_del_tunnel ");
- s = format (s, "local %U ", format_ip46_address, &mp->local, mp->is_ipv6);
+ ip46_address_t local = to_ip46 (mp->is_ipv6, mp->local);
+ ip46_address_t remote = to_ip46 (mp->is_ipv6, mp->remote);
- s = format (s, "remote %U ", format_ip46_address, &mp->remote, mp->is_ipv6);
+ u8 is_grp = ip46_address_is_multicast (&remote);
+ char *remote_name = is_grp ? "group" : "remote";
+ s = format (s, "local %U ", format_ip46_address, &local, IP46_TYPE_ANY);
+ s = format (s, "%s %U ", remote_name, format_ip46_address,
+ &remote, IP46_TYPE_ANY);
+
+ if (is_grp)
+ s = format (s, "mcast_sw_if_index %d ", ntohl (mp->mcast_sw_if_index));
s = format (s, "protocol %d ", ntohl (mp->protocol));
s = format (s, "vni %d ", ntohl (mp->vni));