diff options
author | Neale Ranns <neale.ranns@cisco.com> | 2018-01-09 04:11:28 -0800 |
---|---|---|
committer | Dave Wallace <dwallacelf@gmail.com> | 2018-01-09 17:02:17 +0000 |
commit | f453a10cd4575f4d0a0467a4d61c75466cfd6efc (patch) | |
tree | 9016cddbbe7086c15ffdec501cb96d757b5e5547 | |
parent | 2b97ac55edc5ba9fadf987d1c787102786ea8c4d (diff) |
BIER: missing endian swap for imposition object in API return
Change-Id: Iddd754d00ace3d042336e5c2c40431566275051a
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
(cherry picked from commit eea537a288721b867d65b736363ab3f71ba6116c)
-rw-r--r-- | src/vnet/bier/bier_api.c | 2 | ||||
-rw-r--r-- | test/test_bier.py | 8 | ||||
-rw-r--r-- | test/vpp_ip_route.py | 1 |
3 files changed, 8 insertions, 3 deletions
diff --git a/src/vnet/bier/bier_api.c b/src/vnet/bier/bier_api.c index 92712580f14..3da6c192f1f 100644 --- a/src/vnet/bier/bier_api.c +++ b/src/vnet/bier/bier_api.c @@ -350,7 +350,7 @@ vl_api_bier_imp_add_t_handler (vl_api_bier_imp_add_t * mp) /* *INDENT-OFF* */ REPLY_MACRO2 (VL_API_BIER_IMP_ADD_REPLY, ({ - rmp->bi_index = bii; + rmp->bi_index = ntohl (bii); })); /* *INDENT-OM* */ } diff --git a/test/test_bier.py b/test/test_bier.py index e9c23febdd1..03ae52abad4 100644 --- a/test/test_bier.py +++ b/test/test_bier.py @@ -470,10 +470,14 @@ class TestBier(VppTestCase): bier_route.add_vpp_config() # - # An imposition object with all bit-positions set + # An 2 imposition objects with all bit-positions set + # only use the second, but creating 2 tests with a non-zero + # value index in the route add # bi = VppBierImp(self, bti, 333, chr(0xff) * 32) bi.add_vpp_config() + bi2 = VppBierImp(self, bti, 334, chr(0xff) * 32) + bi2.add_vpp_config() # # Add a multicast route that will forward into the BIER doamin @@ -488,7 +492,7 @@ class TestBier(VppTestCase): VppMRoutePath(0xffffffff, MRouteItfFlags.MFIB_ITF_FLAG_FORWARD, proto=DpoProto.DPO_PROTO_BIER, - bier_imp=bi.bi_index)]) + bier_imp=bi2.bi_index)]) route_ing_232_1_1_1.add_vpp_config() # diff --git a/test/vpp_ip_route.py b/test/vpp_ip_route.py index 3bc3b65111c..fedf1302e21 100644 --- a/test/vpp_ip_route.py +++ b/test/vpp_ip_route.py @@ -308,6 +308,7 @@ class VppIpMRoute(VppObject): path.nh_itf, path.nh_i_flags, table_id=self.table_id, + bier_imp=path.bier_imp, is_add=0, is_ipv6=self.is_ip6) |