summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@vyos.io>2023-11-22 00:09:55 +0000
committerGitHub <noreply@github.com>2023-11-22 00:09:55 +0000
commit93ded25d19000b117de80a064a150925e7b9ff96 (patch)
tree8e30ac38a9c477f0c44eb834d50301b089ec1946 /python
parentc87edc8f1f61dda36ece893dc523fa73e69307df (diff)
parent1f7968d032df2a86069b739416d1ca50501aa491 (diff)
downloadvyos-1x-93ded25d19000b117de80a064a150925e7b9ff96.tar.gz
vyos-1x-93ded25d19000b117de80a064a150925e7b9ff96.zip
Merge pull request #2520 from vyos/mergify/bp/sagitta/pr-2518
T5770 Enable MACsec encryption stanza (backport #2518)
Diffstat (limited to 'python')
-rw-r--r--python/vyos/ifconfig/macsec.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/python/vyos/ifconfig/macsec.py b/python/vyos/ifconfig/macsec.py
index 9329c5ee7..bde1d9aec 100644
--- a/python/vyos/ifconfig/macsec.py
+++ b/python/vyos/ifconfig/macsec.py
@@ -45,6 +45,10 @@ class MACsecIf(Interface):
# create tunnel interface
cmd = 'ip link add link {source_interface} {ifname} type {type}'.format(**self.config)
cmd += f' cipher {self.config["security"]["cipher"]}'
+
+ if 'encrypt' in self.config["security"]:
+ cmd += ' encrypt on'
+
self._cmd(cmd)
# Check if using static keys