summaryrefslogtreecommitdiffstats
path: root/src/vat/api_format.c
diff options
context:
space:
mode:
authorWojciech Dec <wdec@cisco.com>2017-03-07 19:30:39 +0100
committerJohn Lo <loj@cisco.com>2017-03-07 20:50:03 +0000
commit09a38a6db4235dcacbfb6d5e3686faaeb1c25a37 (patch)
tree79a2f134b6c6d990045d761e698f7aba8cc8a964 /src/vat/api_format.c
parent3212c57087069c5137abe4919ac1336e79fa93e9 (diff)
Fix endian issue in ARP Event Reply
ARP Event reply sw_if_index was getting passed in host byte order. Change-Id: Ifae8673906ac2c4233f146786a3d02c38280809b Signed-off-by: Wojciech Dec <wdec@cisco.com>
Diffstat (limited to 'src/vat/api_format.c')
-rw-r--r--src/vat/api_format.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/vat/api_format.c b/src/vat/api_format.c
index 53e9ca1fb2e..0b60b91090d 100644
--- a/src/vat/api_format.c
+++ b/src/vat/api_format.c
@@ -1254,10 +1254,11 @@ static void vl_api_show_version_reply_t_handler_json
static void
vl_api_ip4_arp_event_t_handler (vl_api_ip4_arp_event_t * mp)
{
+ u32 sw_if_index = ntohl (mp->sw_if_index);
errmsg ("arp %s event: address %U new mac %U sw_if_index %d",
mp->mac_ip ? "mac/ip binding" : "address resolution",
format_ip4_address, &mp->address,
- format_ethernet_address, mp->new_mac, mp->sw_if_index);
+ format_ethernet_address, mp->new_mac, sw_if_index);
}
static void
@@ -1269,10 +1270,11 @@ vl_api_ip4_arp_event_t_handler_json (vl_api_ip4_arp_event_t * mp)
static void
vl_api_ip6_nd_event_t_handler (vl_api_ip6_nd_event_t * mp)
{
+ u32 sw_if_index = ntohl (mp->sw_if_index);
errmsg ("ip6 nd %s event: address %U new mac %U sw_if_index %d",
mp->mac_ip ? "mac/ip binding" : "address resolution",
format_ip6_address, mp->address,
- format_ethernet_address, mp->new_mac, mp->sw_if_index);
+ format_ethernet_address, mp->new_mac, sw_if_index);
}
static void