summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorGiga Murphy <giga1699@gmail.com>2023-11-21 13:59:20 -0500
committerChristian Breunig <christian@breunig.cc>2023-11-21 21:08:55 +0100
commita7a90e81ad03ec33acb32beeab71dbd5f27a2044 (patch)
tree9d29b55f22fce33530d01308e07b883940fcdb42 /python
parent3ab206b04350aec4872ed72ae4bd3440a47204f0 (diff)
downloadvyos-1x-a7a90e81ad03ec33acb32beeab71dbd5f27a2044.tar.gz
vyos-1x-a7a90e81ad03ec33acb32beeab71dbd5f27a2044.zip
macsec: T5770: enable iproute2 "encrypt on" 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