summaryrefslogtreecommitdiff
path: root/smoketest/scripts/cli
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2026-06-05 20:52:32 +0200
committerGitHub <noreply@github.com>2026-06-05 20:52:32 +0200
commitf1937d177fd0e3ba3e65db6a88573e66f9f62569 (patch)
tree1654cb1bc1211d6d7b6696d163ad1661bae925d6 /smoketest/scripts/cli
parentf4a6d053846974315cb35e292b26ad76ef0a99d8 (diff)
parent9b98679c257a2ae61d11435028160ae85eedcb80 (diff)
downloadvyos-1x-f1937d177fd0e3ba3e65db6a88573e66f9f62569.tar.gz
vyos-1x-f1937d177fd0e3ba3e65db6a88573e66f9f62569.zip
Merge pull request #5232 from natali-rs1985/T8936
vrf: T8936: Specify `pref 1998` when deleting fwmark routing rules on VRF removal
Diffstat (limited to 'smoketest/scripts/cli')
-rwxr-xr-xsmoketest/scripts/cli/test_interfaces_wireguard.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/smoketest/scripts/cli/test_interfaces_wireguard.py b/smoketest/scripts/cli/test_interfaces_wireguard.py
index cf98deda1..19f9a8275 100755
--- a/smoketest/scripts/cli/test_interfaces_wireguard.py
+++ b/smoketest/scripts/cli/test_interfaces_wireguard.py
@@ -21,6 +21,7 @@ from base_interfaces_test import BasicInterfaceTest
from base_interfaces_test import VyOSUnitTestSHIM
from vyos.configsession import ConfigSessionError
+from vyos.defaults import wireguard_fwmark_pref
from vyos.utils.file import read_file
from vyos.utils.process import cmd
from vyos.utils.process import is_systemd_service_running
@@ -282,29 +283,29 @@ class WireGuardInterfaceTest(BasicInterfaceTest.TestCase):
hex_fwmark = hex(int(mark))
- # Verify ip rule at priority 1998 routes fwmark-tagged packets into the VRF
- tmp = cmd(f'ip rule show priority 1998')
+ # Verify WireGuard fwmark routing rule is created at wireguard_fwmark_pref priority
+ tmp = cmd(f'ip rule show priority {wireguard_fwmark_pref}')
self.assertIn(f'fwmark {hex_fwmark} lookup {vrf}', tmp)
# Remove VRF from the interface — ip rule must be cleaned up
self.cli_delete(base_interface_path + ['vrf'])
self.cli_commit()
- tmp = cmd(f'ip rule show priority 1998')
+ tmp = cmd(f'ip rule show priority {wireguard_fwmark_pref}')
self.assertNotIn(f'fwmark {hex_fwmark}', tmp)
# Re-add VRF — ip rule must be re-created
self.cli_set(base_interface_path + ['vrf', vrf])
self.cli_commit()
- tmp = cmd(f'ip rule show priority 1998')
+ tmp = cmd(f'ip rule show priority {wireguard_fwmark_pref}')
self.assertIn(f'fwmark {hex_fwmark} lookup {vrf}', tmp)
# Delete the interface entirely — ip rule must be removed
self.cli_delete(base_interface_path)
self.cli_commit()
- tmp = cmd(f'ip rule show priority 1998')
+ tmp = cmd(f'ip rule show priority {wireguard_fwmark_pref}')
self.assertNotIn(f'fwmark {hex_fwmark}', tmp)
self.cli_delete(['vrf', 'name', vrf])