diff options
author | Christian Poessinger <christian@poessinger.com> | 2020-12-29 11:34:40 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2020-12-29 11:51:28 +0100 |
commit | d59354e52a8a7fbdd6bb0a020f50600d64c799a9 (patch) | |
tree | 5bc44f1b8ca1dbb38a138ac8fc62645bc308e831 /python | |
parent | 5e5e87467dd6b22d1378269f4a62825b7d122a5c (diff) | |
download | vyos-1x-d59354e52a8a7fbdd6bb0a020f50600d64c799a9.tar.gz vyos-1x-d59354e52a8a7fbdd6bb0a020f50600d64c799a9.zip |
ethernet: T1466: add EAPoL support
Diffstat (limited to 'python')
-rw-r--r-- | python/vyos/configverify.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/python/vyos/configverify.py b/python/vyos/configverify.py index 675dac5b1..96eeb6bb1 100644 --- a/python/vyos/configverify.py +++ b/python/vyos/configverify.py @@ -89,6 +89,15 @@ def verify_vrf(config): 'Interface "{ifname}" cannot be both a member of VRF "{vrf}" ' 'and bridge "{is_bridge_member}"!'.format(**config)) +def verify_eapol(config): + """ + Common helper function used by interface implementations to perform + recurring validation of EAPoL configuration. + """ + if 'eapol' in config: + if not {'cert_file', 'key_file'} <= set(config['eapol']): + raise ConfigError('Both cert and key-file must be specified '\ + 'when using EAPoL!') def verify_address(config): """ |