From 8461eea6c964f4a892028b6743d1bc9c5bcce2ff Mon Sep 17 00:00:00 2001 From: fett0 Date: Fri, 2 Aug 2024 14:27:56 +0000 Subject: OPENVPN: T6555: fix name to bridge (cherry picked from commit 0162a27952d2166583a9e6aee2cd77b9c693062b) --- smoketest/scripts/cli/test_interfaces_openvpn.py | 8 ++------ src/conf_mode/interfaces_openvpn.py | 6 +++--- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/smoketest/scripts/cli/test_interfaces_openvpn.py b/smoketest/scripts/cli/test_interfaces_openvpn.py index 422fe4ceb..9b77a6481 100755 --- a/smoketest/scripts/cli/test_interfaces_openvpn.py +++ b/smoketest/scripts/cli/test_interfaces_openvpn.py @@ -640,8 +640,6 @@ class TestInterfacesOpenVPN(VyOSUnitTestSHIM.TestCase): self.cli_commit() - - config_file = f'/run/openvpn/{vtun_if}.conf' config = read_file(config_file) self.assertIn(f'dev {vtun_if}', config) @@ -651,9 +649,7 @@ class TestInterfacesOpenVPN(VyOSUnitTestSHIM.TestCase): self.assertIn(f'data-ciphers AES-192-CBC', config) self.assertIn(f'mode server', config) self.assertIn(f'server-bridge {gw_subnet} {mask_subnet} {start_subnet} {stop_subnet}', config) - elf.assertIn(f'keepalive 5 25', config) - - + self.assertIn(f'keepalive 5 25', config) # TLS options self.assertIn(f'ca /run/openvpn/{vtun_if}_ca.pem', config) @@ -662,7 +658,7 @@ class TestInterfacesOpenVPN(VyOSUnitTestSHIM.TestCase): self.assertIn(f'dh /run/openvpn/{vtun_if}_dh.pem', config) # check that no interface remained after deleting them - self.cli_delete((['interfaces', 'bridge', br_if, 'member', 'interface', vtun_if]) + self.cli_delete(['interfaces', 'bridge', br_if, 'member', 'interface', vtun_if]) self.cli_delete(base_path) self.cli_commit() diff --git a/src/conf_mode/interfaces_openvpn.py b/src/conf_mode/interfaces_openvpn.py index 3c133bc79..467b6f6af 100755 --- a/src/conf_mode/interfaces_openvpn.py +++ b/src/conf_mode/interfaces_openvpn.py @@ -379,16 +379,16 @@ def verify(openvpn): raise ConfigError(f'Server client "{client_k}": cannot specify more than 1 IPv4 and 1 IPv6 IP') if dict_search('server.bridge', openvpn): - # check if server-bridge is a tap interfaces + # check if server bridge is a tap interfaces if not openvpn['device_type'] == 'tap' and dict_search('server.bridge', openvpn): raise ConfigError('Must specify "device-type tap" with server bridge mode') elif not (dict_search('server.bridge.start', openvpn) and dict_search('server.bridge.stop', openvpn)): - raise ConfigError('Server server bridge requires both start and stop addresses') + raise ConfigError('Server bridge requires both start and stop addresses') else: v4PoolStart = IPv4Address(dict_search('server.bridge.start', openvpn)) v4PoolStop = IPv4Address(dict_search('server.bridge.stop', openvpn)) if v4PoolStart > v4PoolStop: - raise ConfigError(f'Server server bridge start address {v4PoolStart} is larger than stop address {v4PoolStop}') + raise ConfigError(f'Server bridge start address {v4PoolStart} is larger than stop address {v4PoolStop}') v4PoolSize = int(v4PoolStop) - int(v4PoolStart) if v4PoolSize >= 65536: -- cgit v1.2.3