diff options
author | Benoît Ganne <bganne@cisco.com> | 2019-09-03 17:54:21 +0200 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2019-09-03 19:52:40 +0000 |
commit | a03d25d327ed9db40922cfcf247c3ee793c4754d (patch) | |
tree | af4ef3d137299f65484ff71e26c43bb0833f1f0a /src/plugins/gbp/test/test_gbp.py | |
parent | bdf9b97774f02458ede6b7c7ae2d5728bddba000 (diff) |
gbp: fix set_mac() in unit tests
Do not use low-level sw_interface_set_mac_address() directly and use
higher-level set_mac() instead, otherwise interface local_mac and
configured mac are out-of-sync
Type: fix
Fixes: 25b049484f
Change-Id: I9366e7afb95ef00e25a94ca3b0e6309871169878
Signed-off-by: Benoît Ganne <bganne@cisco.com>
Diffstat (limited to 'src/plugins/gbp/test/test_gbp.py')
-rw-r--r-- | src/plugins/gbp/test/test_gbp.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/plugins/gbp/test/test_gbp.py b/src/plugins/gbp/test/test_gbp.py index 2d7fa459440..cb426492891 100644 --- a/src/plugins/gbp/test/test_gbp.py +++ b/src/plugins/gbp/test/test_gbp.py @@ -872,9 +872,7 @@ class TestGBP(VppTestCase): if epg != epgs[1] and epg != epgs[4]: VppIpInterfaceBind(self, epg.bvi, epg.rd.t4).add_vpp_config() VppIpInterfaceBind(self, epg.bvi, epg.rd.t6).add_vpp_config() - self.vapi.sw_interface_set_mac_address( - epg.bvi.sw_if_index, - self.router_mac.packed) + epg.bvi.set_mac(self.router_mac) # The BVIs are NAT inside interfaces flags = self.config_flags.NAT_IS_INSIDE @@ -2261,9 +2259,7 @@ class TestGBP(VppTestCase): if epg != epgs[1]: VppIpInterfaceBind(self, epg.bvi, epg.rd.t4).add_vpp_config() VppIpInterfaceBind(self, epg.bvi, epg.rd.t6).add_vpp_config() - self.vapi.sw_interface_set_mac_address( - epg.bvi.sw_if_index, - self.router_mac.packed) + epg.bvi.set_mac(self.router_mac) if_ip4 = VppIpInterfaceAddress(self, epg.bvi, epg.bvi_ip4, 32) if_ip6 = VppIpInterfaceAddress(self, epg.bvi, epg.bvi_ip6, 128) |