diff options
author | Christian Poessinger <christian@poessinger.com> | 2020-10-01 19:41:19 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2020-10-01 19:41:19 +0200 |
commit | abe6cb06d387bff8e145db1c9848b8b6c3612acb (patch) | |
tree | 1e308750c39eeb462a599ac0bca15b042294426f /src/conf_mode/interfaces-macsec.py | |
parent | 38ae3032180a3d49253237232a0e3de8d2836e7c (diff) | |
download | vyos-1x-abe6cb06d387bff8e145db1c9848b8b6c3612acb.tar.gz vyos-1x-abe6cb06d387bff8e145db1c9848b8b6c3612acb.zip |
macsec: T2023: use proper config path for source-interface on removal
The config path is altered in get_interface_dict() to the base of the interface
in question, e.g. 'interfaces macsec macsec1' - this must be reflected when
calling othe methods of Config().
Diffstat (limited to 'src/conf_mode/interfaces-macsec.py')
-rwxr-xr-x | src/conf_mode/interfaces-macsec.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/conf_mode/interfaces-macsec.py b/src/conf_mode/interfaces-macsec.py index 706b8edb0..2c8367ff3 100755 --- a/src/conf_mode/interfaces-macsec.py +++ b/src/conf_mode/interfaces-macsec.py @@ -59,8 +59,7 @@ def get_config(config=None): # Check if interface has been removed if 'deleted' in macsec: - source_interface = conf.return_effective_value( - base + ['source-interface']) + source_interface = conf.return_effective_value(['source-interface']) macsec.update({'source_interface': source_interface}) return macsec @@ -111,7 +110,7 @@ def generate(macsec): def apply(macsec): # Remove macsec interface - if 'deleted' in macsec.keys(): + if 'deleted' in macsec: call('systemctl stop wpa_supplicant-macsec@{source_interface}' .format(**macsec)) |