From a7a90e81ad03ec33acb32beeab71dbd5f27a2044 Mon Sep 17 00:00:00 2001 From: Giga Murphy Date: Tue, 21 Nov 2023 13:59:20 -0500 Subject: macsec: T5770: enable iproute2 "encrypt on" stanza --- python/vyos/ifconfig/macsec.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'python/vyos/ifconfig') 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 -- cgit v1.2.3