summaryrefslogtreecommitdiff
path: root/smoketest/scripts/cli
diff options
context:
space:
mode:
authorBerik Ashimov <berik@ashimov.com>2026-09-18 14:10:41 +0500
committerBerik Ashimov <berik@ashimov.com>2026-09-18 14:10:41 +0500
commitf931a8703c7b9d421ded01636cd201bc3c466da5 (patch)
treeedd9a0e96165f17905814b1d5b6630ca6aca35a7 /smoketest/scripts/cli
parent03500232bca1e1e2eda017428171faf9b4a3dc27 (diff)
downloadvyos-1x-f931a8703c7b9d421ded01636cd201bc3c466da5.tar.gz
vyos-1x-f931a8703c7b9d421ded01636cd201bc3c466da5.zip
openvpn: T9334: stop rendering "keepalive 0 0"
An interval of 0 is how the CLI turns keepalive off, and it rendered "keepalive 0 0" because OpenVPN skipped its own sanity checks on that pair. OpenVPN 2.7.6 dropped the exception and now refuses to start: "keepalive ping: Must be an integer between 1 and 86400, not 0". Leave the directive out of the file instead. Nothing then sets ping or ping-restart, which is the keepalive-off the interval asked for, and a saved configuration still commits untouched.
Diffstat (limited to 'smoketest/scripts/cli')
-rwxr-xr-xsmoketest/scripts/cli/test_interfaces_openvpn.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/smoketest/scripts/cli/test_interfaces_openvpn.py b/smoketest/scripts/cli/test_interfaces_openvpn.py
index b3b832df6..4f1021a36 100755
--- a/smoketest/scripts/cli/test_interfaces_openvpn.py
+++ b/smoketest/scripts/cli/test_interfaces_openvpn.py
@@ -1419,16 +1419,16 @@ class TestInterfacesOpenVPN(VyOSUnitTestSHIM.TestCase):
config = read_file(f'/run/openvpn/{interface}.conf')
self.assertIn('keepalive 600 43200', config)
- # "interval 0" renders "keepalive 0 0" - OpenVPN skips its own checks
- # on that and runs without keepalive, so it has to keep committing
- # whatever the failure-count says
+ # "interval 0" turns keepalive off, which OpenVPN 2.7.6 no longer
+ # spells "keepalive 0 0", so the directive has to stay out of the
+ # file - the failure-count still commits whatever it says
self.cli_set(path + ['keep-alive', 'interval', '0'])
self.cli_set(path + ['keep-alive', 'failure-count', '1'])
self.cli_commit()
self.assertTrue(is_systemd_service_running(f'openvpn@{interface}.service'))
config = read_file(f'/run/openvpn/{interface}.conf')
- self.assertIn('keepalive 0 0', config)
+ self.assertNotIn('keepalive', config)
def test_openvpn_server_reject_unconfigured_clients(self):
# T8998: reject-unconfigured-clients without server client entries