summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-05-21 13:55:32 +0200
committerChristian Poessinger <christian@poessinger.com>2020-05-21 14:52:10 +0200
commit3872f5995644a8a52358285d682a7103b54dde04 (patch)
tree3d4edb713d215c9b1fd4ee9f90288ad8751246b7 /python
parent63a3110298e5f3f6d24d5ed57eff0a8abf27f6ac (diff)
downloadvyos-1x-3872f5995644a8a52358285d682a7103b54dde04.tar.gz
vyos-1x-3872f5995644a8a52358285d682a7103b54dde04.zip
macsec: T2023: use wpa_supplicant for key management
Diffstat (limited to 'python')
-rw-r--r--python/vyos/ifconfig/macsec.py13
1 files changed, 4 insertions, 9 deletions
diff --git a/python/vyos/ifconfig/macsec.py b/python/vyos/ifconfig/macsec.py
index 1829df4ab..ea8c9807e 100644
--- a/python/vyos/ifconfig/macsec.py
+++ b/python/vyos/ifconfig/macsec.py
@@ -30,7 +30,7 @@ class MACsecIf(Interface):
default = {
'type': 'macsec',
- 'cipher': '',
+ 'security_cipher': '',
'source_interface': ''
}
definition = {
@@ -41,7 +41,7 @@ class MACsecIf(Interface):
},
}
options = Interface.options + \
- ['cipher', 'source_interface']
+ ['security_cipher', 'source_interface']
def _create(self):
"""
@@ -50,17 +50,12 @@ class MACsecIf(Interface):
"""
# create tunnel interface
cmd = 'ip link add link {source_interface} {ifname} type {type}'
- cmd += ' cipher {cipher}'
+ cmd += ' cipher {security_cipher}'
self._cmd(cmd.format(**self.config))
# interface is always A/D down. It needs to be enabled explicitly
self.set_admin_state('down')
- def set_encryption(self, on_off):
- ifname = self.config['ifname']
- cmd = f'ip link set {ifname} type macsec encrypt {on_off}'
- return self._cmd(cmd)
-
@staticmethod
def get_config():
"""
@@ -72,7 +67,7 @@ class MACsecIf(Interface):
>> dict = MACsecIf().get_config()
"""
config = {
- 'cipher': '',
+ 'security_cipher': '',
'source_interface': '',
}
return config