aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorIgor Mikhailov (imichail) <imichail@cisco.com>2019-01-11 13:59:04 -0800
committerJohn Lo <loj@cisco.com>2019-01-11 23:14:33 +0000
commiteab857fa32926d9a46bf65a4481c6ba0c61e33a3 (patch)
treef691bb28b1e3568a22876eaa7ed770b94b418360 /src
parent0ac827e15c5ee2134a15bf5e023e03967ddcbaa8 (diff)
Fix custom-dump for gre_add_del_tunnel: src and dst IPs
Change-Id: I747ca01dc8df9fb5e11168ec46979c4a1f1baa7c Signed-off-by: Igor Mikhailov (imichail) <imichail@cisco.com>
Diffstat (limited to 'src')
-rw-r--r--src/vpp/api/custom_dump.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/vpp/api/custom_dump.c b/src/vpp/api/custom_dump.c
index 0d8b453188d..cf016003a47 100644
--- a/src/vpp/api/custom_dump.c
+++ b/src/vpp/api/custom_dump.c
@@ -1915,16 +1915,13 @@ static void *vl_api_gre_add_del_tunnel_t_print
(vl_api_gre_add_del_tunnel_t * mp, void *handle)
{
u8 *s;
+ ip46_address_t src = to_ip46 (mp->is_ipv6, mp->src_address);
+ ip46_address_t dst = to_ip46 (mp->is_ipv6, mp->dst_address);
s = format (0, "SCRIPT: gre_add_del_tunnel ");
- s = format (s, "dst %U ", format_ip46_address,
- (ip46_address_t *) & (mp->dst_address),
- mp->is_ipv6 ? IP46_TYPE_IP6 : IP46_TYPE_IP4);
-
- s = format (s, "src %U ", format_ip46_address,
- (ip46_address_t *) & (mp->src_address),
- mp->is_ipv6 ? IP46_TYPE_IP6 : IP46_TYPE_IP4);
+ s = format (s, "dst %U ", format_ip46_address, &dst, IP46_TYPE_ANY);
+ s = format (s, "src %U ", format_ip46_address, &src, IP46_TYPE_ANY);
s = format (s, "instance %d ", ntohl (mp->instance));