diff options
author | Daniil Baturin <daniil@baturin.org> | 2024-05-27 15:23:53 +0100 |
---|---|---|
committer | Daniil Baturin <daniil@baturin.org> | 2024-05-27 15:23:53 +0100 |
commit | 380e998b10341b6dd42bb94d00a9d7a462ada27a (patch) | |
tree | 427a3b69e981ec58c0715474d958ee90036cb67c /src/conf_mode | |
parent | 48e5266e2bca8d1d7a2ee4bacbe0e6628de3fa66 (diff) | |
download | vyos-1x-380e998b10341b6dd42bb94d00a9d7a462ada27a.tar.gz vyos-1x-380e998b10341b6dd42bb94d00a9d7a462ada27a.zip |
openvpn: T6374: ensure that TLS role is configured for site-to-site with TLS
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-x | src/conf_mode/interfaces_openvpn.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/conf_mode/interfaces_openvpn.py b/src/conf_mode/interfaces_openvpn.py index 0ecffd3be..5b9c21757 100755 --- a/src/conf_mode/interfaces_openvpn.py +++ b/src/conf_mode/interfaces_openvpn.py @@ -260,6 +260,11 @@ def verify(openvpn): # OpenVPN site-to-site - VERIFY # elif openvpn['mode'] == 'site-to-site': + # XXX: site-to-site is the only mode that still can work without TLS, + # so we need to make sure that if TLS is used, then TLS role is also specified + if 'shared_secret_key' not in openvpn['tls'] and 'role' not in openvpn['tls']: + raise ConfigError('"tls role" is required for site-to-site OpenVPN with TLS') + if 'local_address' not in openvpn and 'is_bridge_member' not in openvpn: raise ConfigError('Must specify "local-address" or add interface to bridge') |