diff options
author | Christian Poessinger <christian@poessinger.com> | 2022-04-29 20:40:14 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2022-04-29 20:40:14 +0200 |
commit | dde78e8024dea260a506f31226d57a75d9516df4 (patch) | |
tree | c842092b83cec1be8d0a602441c6eedb0d69e28a /src/conf_mode | |
parent | 598e88f6d0e6ba743b128b0b8b6eb65f804a7e4c (diff) | |
download | vyos-1x-dde78e8024dea260a506f31226d57a75d9516df4.tar.gz vyos-1x-dde78e8024dea260a506f31226d57a75d9516df4.zip |
openvpn: T4369: enforce daemon-restart on openvpn-option CLI change
(cherry picked from commit e36efa6b5df764982678a470b7aa82a33c1c369c)
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-x | src/conf_mode/interfaces-openvpn.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/conf_mode/interfaces-openvpn.py b/src/conf_mode/interfaces-openvpn.py index 38ed127ff..f7edddcbf 100755 --- a/src/conf_mode/interfaces-openvpn.py +++ b/src/conf_mode/interfaces-openvpn.py @@ -29,7 +29,7 @@ from shutil import rmtree from vyos.config import Config from vyos.configdict import get_interface_dict -from vyos.configdict import leaf_node_changed +from vyos.configdict import is_node_changed from vyos.configverify import verify_vrf from vyos.configverify import verify_bridge_delete from vyos.configverify import verify_diffie_hellman_length @@ -83,8 +83,8 @@ def get_config(config=None): openvpn = get_interface_dict(conf, base) if 'deleted' not in openvpn: - tmp = leaf_node_changed(conf, ['openvpn-option']) - if tmp: openvpn['restart_required'] = '' + if is_node_changed(conf, ['openvpn-option']): + openvpn.update({'restart_required': {}}) openvpn['auth_user_pass_file'] = '/run/openvpn/{ifname}.pw'.format(**openvpn) return openvpn |