summaryrefslogtreecommitdiffstats
path: root/src/vnet/lisp-cp/lisp_api.c
diff options
context:
space:
mode:
authorFilip Tehlar <ftehlar@cisco.com>2017-03-10 13:18:02 +0100
committerFlorin Coras <florin.coras@gmail.com>2017-03-10 19:14:10 +0000
commit67a99f8927c3807c8731e00107dff72bc6b6cde2 (patch)
treec7c9493e7b271800250c9cff89c80c521d4e0022 /src/vnet/lisp-cp/lisp_api.c
parentb6391a90c4940f2828ad7a637fca39ccbdd1fd07 (diff)
LISP: fix Proxy-ETR show command, VPP-660
Change-Id: I8b7dc3bf631bd228db23679534e04b8af7ac4ec7 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Diffstat (limited to 'src/vnet/lisp-cp/lisp_api.c')
-rw-r--r--src/vnet/lisp-cp/lisp_api.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/src/vnet/lisp-cp/lisp_api.c b/src/vnet/lisp-cp/lisp_api.c
index d91f9907752..6c82d4cf049 100644
--- a/src/vnet/lisp-cp/lisp_api.c
+++ b/src/vnet/lisp-cp/lisp_api.c
@@ -445,9 +445,24 @@ vl_api_show_lisp_use_petr_t_handler (vl_api_show_lisp_use_petr_t * mp)
/* *INDENT-OFF* */
REPLY_MACRO2 (VL_API_SHOW_LISP_USE_PETR_REPLY,
{
- rmp->status = status;
- gid_address_put (rmp->address, &addr);
- rmp->is_ip4 = (gid_address_ip_version (&addr) == IP4);
+ rmp->status = status;
+ ip_address_t *ip = &gid_address_ip (&addr);
+ switch (ip_addr_version (ip))
+ {
+ case IP4:
+ clib_memcpy (rmp->address, &ip_addr_v4 (ip),
+ sizeof (ip_addr_v4 (ip)));
+ break;
+
+ case IP6:
+ clib_memcpy (rmp->address, &ip_addr_v6 (ip),
+ sizeof (ip_addr_v6 (ip)));
+ break;
+
+ default:
+ ASSERT (0);
+ }
+ rmp->is_ip4 = (gid_address_ip_version (&addr) == IP4);
});
/* *INDENT-ON* */
}