diff options
| author | Christian Breunig <christian@breunig.cc> | 2026-05-26 08:11:55 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-05-26 08:11:55 +0200 |
| commit | 9534f4202e4430b4a58caa28603e5594178fd745 (patch) | |
| tree | cac0d3076244ada474801d939a394e27c9de4a33 /smoketest/scripts/cli | |
| parent | 7b19c149d4edd39bfe441f1d38d602c707fa7ae2 (diff) | |
| parent | 33ac35a45b813ab408c7ce0ccb511608a637fc68 (diff) | |
| download | vyos-1x-9534f4202e4430b4a58caa28603e5594178fd745.tar.gz vyos-1x-9534f4202e4430b4a58caa28603e5594178fd745.zip | |
Merge pull request #5119 from AppMana/T8480
wan: T8480: add suppress_prefixlength ip rules for internal routing
Diffstat (limited to 'smoketest/scripts/cli')
| -rwxr-xr-x | smoketest/scripts/cli/test_load-balancing_wan.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/test_load-balancing_wan.py b/smoketest/scripts/cli/test_load-balancing_wan.py index 3b956a12e..1692b8760 100755 --- a/smoketest/scripts/cli/test_load-balancing_wan.py +++ b/smoketest/scripts/cli/test_load-balancing_wan.py @@ -138,6 +138,23 @@ class TestLoadBalancingWan(VyOSUnitTestSHIM.TestCase): tmp = cmd('sudo ip route show table 202') self.assertEqual(tmp, original) + tmp = cmd('sudo ip rule show') + self.assertIn('from all fwmark 0xc9 lookup 201', tmp) + self.assertIn('from all fwmark 0xca lookup 202', tmp) + self.assertNotIn('fwmark 0xc9 lookup main suppress_prefixlength 0', tmp) + self.assertNotIn('fwmark 0xca lookup main suppress_prefixlength 0', tmp) + + self.cli_set(base_path + ['wan', 'only-default-route']) + self.cli_commit() + + time.sleep(5) + + tmp = cmd('sudo ip rule show') + self.assertIn('from all fwmark 0xc9 lookup main suppress_prefixlength 0', tmp) + self.assertIn('from all fwmark 0xc9 lookup 201', tmp) + self.assertIn('from all fwmark 0xca lookup main suppress_prefixlength 0', tmp) + self.assertIn('from all fwmark 0xca lookup 202', tmp) + # Delete veth interfaces and netns for iface in [iface1, iface2, iface3]: call(f'sudo ip link del dev {iface}') |
