diff options
| author | Daniil Baturin <daniil@vyos.io> | 2025-08-12 15:21:59 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-12 15:21:59 +0100 |
| commit | 33b13061b55a8dbf302dcfaed1cf89b3e0f12e63 (patch) | |
| tree | dbcfbf63d70bd117b78839a948655298ea1256a2 /smoketest/scripts/cli | |
| parent | 7b42041ec7035a822bede3df4abbacb683f6d314 (diff) | |
| parent | 6ebb8cd26962b9840a912d5fb0ab2d891f7b00e2 (diff) | |
| download | vyos-1x-33b13061b55a8dbf302dcfaed1cf89b3e0f12e63.tar.gz vyos-1x-33b13061b55a8dbf302dcfaed1cf89b3e0f12e63.zip | |
Merge pull request #4656 from c-po/bonding-T7571
bond: T7571: fix inconsistent MAC address behaviour
Diffstat (limited to 'smoketest/scripts/cli')
| -rwxr-xr-x | smoketest/scripts/cli/test_interfaces_bonding.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/test_interfaces_bonding.py b/smoketest/scripts/cli/test_interfaces_bonding.py index 2473bc732..57d245ae6 100755 --- a/smoketest/scripts/cli/test_interfaces_bonding.py +++ b/smoketest/scripts/cli/test_interfaces_bonding.py @@ -62,6 +62,23 @@ class BondingInterfaceTest(BasicInterfaceTest.TestCase): slaves = read_file(f'/sys/class/net/{interface}/bonding/slaves').split() self.assertListEqual(slaves, self._members) + def test_bonding_keep_mac(self): + # T7571: A bond interface should always run from the physical interfaces + # MAC address and not a synthetic one. + base_mac = Interface(self._members[0]).get_mac() + + # configure member interfaces + for interface in self._interfaces: + for option in self._options.get(interface, []): + self.cli_set(self._base_path + [interface] + option.split()) + + self.cli_commit() + + # Verify bond interface MAC address matches the address of it's first member + for interface in self._interfaces: + mac = Interface(interface).get_mac() + self.assertEqual(mac, base_mac) + def test_bonding_remove_member(self): # T2515: when removing a bond member the previously enslaved/member # interface must be in its former admin-up/down state. Here we ensure |
