From cb68cc29733ee1dc9df5201e4f85ab5de776cb20 Mon Sep 17 00:00:00 2001 From: Giga Murphy Date: Fri, 18 Aug 2023 01:19:58 +0000 Subject: T5447: MACsec static tx-key validation --- src/conf_mode/interfaces-macsec.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/conf_mode/interfaces-macsec.py b/src/conf_mode/interfaces-macsec.py index 45fa3f5af..5045a9856 100755 --- a/src/conf_mode/interfaces-macsec.py +++ b/src/conf_mode/interfaces-macsec.py @@ -95,6 +95,9 @@ def verify(macsec): # Logic to check static configuration if dict_search('security.static', macsec) != None: + # tx-key must be defined + if dict_search('security.static.tx_key', macsec) == None: + raise ConfigError('Static MACsec tx-key must be defined.') tx_len = len(dict_search('security.static.tx_key', macsec)) -- cgit v1.2.3