From d59354e52a8a7fbdd6bb0a020f50600d64c799a9 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Tue, 29 Dec 2020 11:34:40 +0100 Subject: ethernet: T1466: add EAPoL support --- python/vyos/configverify.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'python') 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): """ -- cgit v1.2.3