diff options
author | Daniil Baturin <daniil@vyos.io> | 2022-09-15 15:22:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-15 15:22:05 +0100 |
commit | 435016fdb353b79577c40baa23af8e01fcadd098 (patch) | |
tree | 12b9acdc00ba63041b96d54bdeb339c3264959dd /src/conf_mode/interfaces-macsec.py | |
parent | e57146723fd791d71ac9659f9247a8827c151c97 (diff) | |
parent | 87894a2fa32933400a930783edcce74a8b4792a4 (diff) | |
download | vyos-1x-435016fdb353b79577c40baa23af8e01fcadd098.tar.gz vyos-1x-435016fdb353b79577c40baa23af8e01fcadd098.zip |
Merge pull request #1519 from c-po/t4630-equuleus-peth-macsec
T4630: disallow same source-interface for macsec and pseudo-ethernet
Diffstat (limited to 'src/conf_mode/interfaces-macsec.py')
-rwxr-xr-x | src/conf_mode/interfaces-macsec.py | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/conf_mode/interfaces-macsec.py b/src/conf_mode/interfaces-macsec.py index 8076a27b6..8a969d90f 100755 --- a/src/conf_mode/interfaces-macsec.py +++ b/src/conf_mode/interfaces-macsec.py @@ -67,7 +67,7 @@ def get_config(config=None): macsec.update({'shutdown_required': {}}) if 'source_interface' in macsec: - tmp = is_source_interface(conf, macsec['source_interface'], 'macsec') + tmp = is_source_interface(conf, macsec['source_interface'], ['macsec', 'pseudo-ethernet']) if tmp and tmp != ifname: macsec.update({'is_source_interface' : tmp}) return macsec @@ -101,12 +101,6 @@ def verify(macsec): # gcm-aes-128 requires a 128bit long key - 64 characters (string) = 32byte = 256bit raise ConfigError('gcm-aes-128 requires a 256bit long key!') - if 'is_source_interface' in macsec: - tmp = macsec['is_source_interface'] - src_ifname = macsec['source_interface'] - raise ConfigError(f'Can not use source-interface "{src_ifname}", it already ' \ - f'belongs to interface "{tmp}"!') - if 'source_interface' in macsec: # MACsec adds a 40 byte overhead (32 byte MACsec + 8 bytes VLAN 802.1ad # and 802.1q) - we need to check the underlaying MTU if our configured |