summaryrefslogtreecommitdiff
path: root/src/conf_mode/interfaces-macsec.py
diff options
context:
space:
mode:
authorGiga Murphy <giga1699@gmail.com>2023-08-18 01:19:58 +0000
committerGiga Murphy <giga1699@gmail.com>2023-08-18 01:19:58 +0000
commitcb68cc29733ee1dc9df5201e4f85ab5de776cb20 (patch)
tree6f6397dfe190151df603032d352c4be81659798b /src/conf_mode/interfaces-macsec.py
parent33b9bc55f9e3d7ce6a5ff447a6b545a96915daf3 (diff)
downloadvyos-1x-cb68cc29733ee1dc9df5201e4f85ab5de776cb20.tar.gz
vyos-1x-cb68cc29733ee1dc9df5201e4f85ab5de776cb20.zip
T5447: MACsec static tx-key validation
Diffstat (limited to 'src/conf_mode/interfaces-macsec.py')
-rwxr-xr-xsrc/conf_mode/interfaces-macsec.py3
1 files changed, 3 insertions, 0 deletions
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))