summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-11-21 21:17:01 +0100
committerGitHub <noreply@github.com>2023-11-21 21:17:01 +0100
commitd3c7d9731b44e966313bb1ba3cc3c731d79200a9 (patch)
treeff0187dca6f6d377e7dd022cc6dc2dcaca4477bc /python
parent821eaea09d2e58ac5e2e5857ca9249f811062a4b (diff)
parenta7a90e81ad03ec33acb32beeab71dbd5f27a2044 (diff)
downloadvyos-1x-d3c7d9731b44e966313bb1ba3cc3c731d79200a9.tar.gz
vyos-1x-d3c7d9731b44e966313bb1ba3cc3c731d79200a9.zip
Merge pull request #2518 from giga1699/T5770
T5770 Enable MACsec encryption stanza
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