From 54582663ab7d7105bc2407036a311d68707e5ab9 Mon Sep 17 00:00:00 2001 From: Dave Barach Date: Tue, 21 Apr 2020 08:01:16 -0400 Subject: vat: fix increment_address(...) vl_api_address_t uses a packed enum for the address family, compare a->af directly with ADDRESS_IP4 / ADDRESS_IP6 instead of running a->af through clib_host_to_net_u32(...) before compare. Indirectly fixes api_ip_route_add_del(...) w/ count > 1. Type: fix Signed-off-by: Dave Barach Change-Id: Ib7f562ec9e92ee63e52a338d318fcf1ce6221755 --- src/vat/api_format.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/vat') diff --git a/src/vat/api_format.c b/src/vat/api_format.c index e7d0b026312..bea743f9283 100644 --- a/src/vat/api_format.c +++ b/src/vat/api_format.c @@ -766,9 +766,9 @@ increment_v6_address (vl_api_ip6_address_t * i) static void increment_address (vl_api_address_t * a) { - if (clib_net_to_host_u32 (a->af) == ADDRESS_IP4) + if (a->af == ADDRESS_IP4) increment_v4_address (&a->un.ip4); - else if (clib_net_to_host_u32 (a->af) == ADDRESS_IP6) + else if (a->af == ADDRESS_IP6) increment_v6_address (&a->un.ip6); } -- cgit 1.2.3-korg