summaryrefslogtreecommitdiff
path: root/python/vyos/ifconfig/macsec.py
diff options
context:
space:
mode:
authorGiga Murphy <giga1699@gmail.com>2023-11-21 13:59:20 -0500
committerMergify <37929162+mergify[bot]@users.noreply.github.com>2023-11-21 20:17:27 +0000
commit945dacc0d136bf4e2dfe593d8d9809262d0cfeaa (patch)
tree04f26630b3071ad851f02427da51e13fd8859bcd /python/vyos/ifconfig/macsec.py
parent916adfaf0774df0731522bf3cbd886d794735c50 (diff)
downloadvyos-1x-945dacc0d136bf4e2dfe593d8d9809262d0cfeaa.tar.gz
vyos-1x-945dacc0d136bf4e2dfe593d8d9809262d0cfeaa.zip
macsec: T5770: enable iproute2 "encrypt on" stanza
(cherry picked from commit a7a90e81ad03ec33acb32beeab71dbd5f27a2044)
Diffstat (limited to 'python/vyos/ifconfig/macsec.py')
-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