summaryrefslogtreecommitdiff
path: root/smoketest/scripts/cli
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2026-10-31 14:44:57 +0100
committerChristian Breunig <christian@breunig.cc>2026-10-31 14:44:57 +0100
commit5d352d7902019469d2f87aa8fc398af2de213dee (patch)
treee58d5847b7bd18e391413bd84c5a1ac9bc403a69 /smoketest/scripts/cli
parenta55cf4670f02a14a8582669abacb4fdeb01c7a62 (diff)
downloadvyos-1x-5d352d7902019469d2f87aa8fc398af2de213dee.tar.gz
vyos-1x-5d352d7902019469d2f87aa8fc398af2de213dee.zip
smoketest: T9543: assign the local address in the ipsec reset test
The reset test configured its peers with a local address that was not present on any interface, so starting the peer at commit relied on how charon handles a source address the router does not own. Assign the address to the interface IPsec is bound to and remove it again at the end of the test.
Diffstat (limited to 'smoketest/scripts/cli')
-rwxr-xr-xsmoketest/scripts/cli/test_vpn_ipsec.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/test_vpn_ipsec.py b/smoketest/scripts/cli/test_vpn_ipsec.py
index 80d9c25c9..6672690b3 100755
--- a/smoketest/scripts/cli/test_vpn_ipsec.py
+++ b/smoketest/scripts/cli/test_vpn_ipsec.py
@@ -897,6 +897,11 @@ class TestVPNIPsec(VyOSUnitTestSHIM.TestCase):
'initiate',
)
+ # IPsec is bound to this interface in setUpClass()
+ self.cli_set(
+ ethernet_path + [interface, 'vif', vif, 'address', f'{local_address}/24']
+ )
+
psk_base_path = base_path + ['authentication', 'psk', connection_name]
self.cli_set(psk_base_path + ['id', local_address])
self.cli_set(psk_base_path + ['id', peer_ip])
@@ -973,6 +978,8 @@ class TestVPNIPsec(VyOSUnitTestSHIM.TestCase):
out = self.op_mode(['reset', 'vpn', 'ipsec', 'site-to-site', 'peer', name])
self.assertNotIn('initiate result', out)
+ self.cli_delete(ethernet_path + [interface, 'vif', vif, 'address'])
+
def test_dmvpn(self):
ike_lifetime = '3600'
esp_lifetime = '1800'