summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2019-07-03 08:00:53 +0000
committerNeale Ranns <nranns@cisco.com>2019-07-03 08:00:53 +0000
commitb34f99ced80a8eeb8c4eba5e2d023d70f210253b (patch)
treee60d81df0e9e0f31a7d8c6627d2baea801f5bac8 /src
parent063366eb23a81ea2d4079d291a2ff534acf75d2d (diff)
vat: Fix the incrementing IPv6 address
Type: fix Change-Id: Ie085713f45672e112993638e01cdb325f451020a Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src')
-rw-r--r--src/vat/api_format.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vat/api_format.c b/src/vat/api_format.c
index d9c13ad8644..e0d77a46b2b 100644
--- a/src/vat/api_format.c
+++ b/src/vat/api_format.c
@@ -737,9 +737,9 @@ increment_v6_address (vl_api_ip6_address_t * i)
static void
increment_address (vl_api_address_t * a)
{
- if (a->af == ADDRESS_IP4)
+ if (clib_net_to_host_u32 (a->af) == ADDRESS_IP4)
increment_v4_address (&a->un.ip4);
- else if (a->af == ADDRESS_IP6)
+ else if (clib_net_to_host_u32 (a->af) == ADDRESS_IP6)
increment_v6_address (&a->un.ip6);
}