diff options
author | fett0 <fernando.gmaidana@gmail.com> | 2024-08-02 14:10:51 +0000 |
---|---|---|
committer | Mergify <37929162+mergify[bot]@users.noreply.github.com> | 2024-09-09 11:42:36 +0000 |
commit | 06050d7a668bab79a27ddbec0a5f7b88868dc390 (patch) | |
tree | 3fb0fe15bb4a76199b3453562ec32b86eff1c510 /src/conf_mode | |
parent | 62f5bc773ac01b25a874fea3a16b492c9659c26d (diff) | |
download | vyos-1x-06050d7a668bab79a27ddbec0a5f7b88868dc390.tar.gz vyos-1x-06050d7a668bab79a27ddbec0a5f7b88868dc390.zip |
OPENVPN: T6555: fix name to bridge
(cherry picked from commit d5ae708581d453e2205ad4cf8576503f42e262b6)
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-x | src/conf_mode/interfaces_openvpn.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/conf_mode/interfaces_openvpn.py b/src/conf_mode/interfaces_openvpn.py index ded836c5f..3c133bc79 100755 --- a/src/conf_mode/interfaces_openvpn.py +++ b/src/conf_mode/interfaces_openvpn.py @@ -378,21 +378,21 @@ def verify(openvpn): if (client_v.get('ip') and len(client_v['ip']) > 1) or (client_v.get('ipv6_ip') and len(client_v['ipv6_ip']) > 1): raise ConfigError(f'Server client "{client_k}": cannot specify more than 1 IPv4 and 1 IPv6 IP') - if dict_search('server.server_bridge', openvpn): + if dict_search('server.bridge', openvpn): # check if server-bridge is a tap interfaces - if not openvpn['device_type'] == 'tap' and dict_search('server.server_bridge', openvpn): - raise ConfigError('Must specify "device-type tap" with server-bridge mode') - elif not (dict_search('server.server_bridge.start', openvpn) and dict_search('server.server_bridge.stop', openvpn)): - raise ConfigError('Server server-bridge requires both start and stop addresses') + 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') else: - v4PoolStart = IPv4Address(dict_search('server.server_bridge.start', openvpn)) - v4PoolStop = IPv4Address(dict_search('server.server_bridge.stop', openvpn)) + 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 server bridge start address {v4PoolStart} is larger than stop address {v4PoolStop}') v4PoolSize = int(v4PoolStop) - int(v4PoolStart) if v4PoolSize >= 65536: - raise ConfigError(f'Server server_bridge is too large [{v4PoolStart} -> {v4PoolStop} = {v4PoolSize}], maximum is 65536 addresses.') + raise ConfigError(f'Server bridge is too large [{v4PoolStart} -> {v4PoolStop} = {v4PoolSize}], maximum is 65536 addresses.') if dict_search('server.client_ip_pool', openvpn): if not (dict_search('server.client_ip_pool.start', openvpn) and dict_search('server.client_ip_pool.stop', openvpn)): |