summaryrefslogtreecommitdiff
path: root/python/vyos/ifconfig/macsec.py
diff options
context:
space:
mode:
authorGiga Murphy <giga1699@gmail.com>2023-08-20 15:46:50 +0000
committerGiga Murphy <giga1699@gmail.com>2023-08-20 15:46:50 +0000
commit525beb3202bb3ccb15c28d2c41e24e68762af253 (patch)
tree6ce4a98ac789cd6344cc99b899970986d84ecd71 /python/vyos/ifconfig/macsec.py
parentd110af71cb1c8b62758feae724e13877a278c578 (diff)
downloadvyos-1x-525beb3202bb3ccb15c28d2c41e24e68762af253.tar.gz
vyos-1x-525beb3202bb3ccb15c28d2c41e24e68762af253.zip
T5447: Implement maintainer feedback
Diffstat (limited to 'python/vyos/ifconfig/macsec.py')
-rw-r--r--python/vyos/ifconfig/macsec.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/python/vyos/ifconfig/macsec.py b/python/vyos/ifconfig/macsec.py
index 6318a1688..e14f22c58 100644
--- a/python/vyos/ifconfig/macsec.py
+++ b/python/vyos/ifconfig/macsec.py
@@ -51,7 +51,7 @@ class MACsecIf(Interface):
if 'static' in self.config["security"]:
# Set static TX key
cmd = 'ip macsec add {ifname} tx sa 0 pn 1 on key 00'.format(**self.config)
- cmd += f' {self.config["security"]["static"]["tx_key"]}'
+ cmd += f' {self.config["security"]["static"]["key"]}'
self._cmd(cmd)
for peer, peer_config in self.config["security"]["static"]["peer"].items():
@@ -63,11 +63,11 @@ class MACsecIf(Interface):
cmd += f' {peer_config["mac"]}'
self._cmd(cmd)
# Add the rx-key to the address
- cmd += f' sa 0 pn 1 on key 01 {peer_config["rx_key"]}'
+ cmd += f' sa 0 pn 1 on key 01 {peer_config["key"]}'
self._cmd(cmd)
# Set admin state to up
- self.set_admin_state('up')
+ self.set_admin_state('down')
else:
# interface is always A/D down. It needs to be enabled explicitly