summaryrefslogtreecommitdiff
path: root/python/vyos/ifconfig
diff options
context:
space:
mode:
authorAndreas <vyos-git@justsecure.de>2021-12-29 18:02:06 +0100
committerChristian Poessinger <christian@poessinger.com>2022-02-21 18:31:10 +0100
commit1d4b567b219678cafebfa0117be6779de30f9017 (patch)
tree93842e9bf975c20c5592f2fa21e0b0cc5feb1e3d /python/vyos/ifconfig
parent2b646cd462577e713b6caf6b5a67d6f6bebdcb1c (diff)
downloadvyos-1x-1d4b567b219678cafebfa0117be6779de30f9017.tar.gz
vyos-1x-1d4b567b219678cafebfa0117be6779de30f9017.zip
vxlan: T4120: add ability to set multiple remotes (PR #1127)
VXLAN does support using multiple remotes but VyOS does not. Add the ability to set multiple remotes and add their flood lists using "bridge" command. (cherry picked from commit 0ecddff7cffa8900d351d5c15e32420f9d780c0b)
Diffstat (limited to 'python/vyos/ifconfig')
-rw-r--r--python/vyos/ifconfig/vxlan.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/python/vyos/ifconfig/vxlan.py b/python/vyos/ifconfig/vxlan.py
index d73fb47b8..93d5b20c8 100644
--- a/python/vyos/ifconfig/vxlan.py
+++ b/python/vyos/ifconfig/vxlan.py
@@ -79,3 +79,10 @@ class VXLANIf(Interface):
self._cmd(cmd.format(**self.config))
# interface is always A/D down. It needs to be enabled explicitly
self.set_admin_state('down')
+
+ other_remotes = self.config.get('other_remotes')
+ if other_remotes:
+ for rem in other_remotes:
+ self.config['rem'] = rem
+ cmd2 = 'bridge fdb append to 00:00:00:00:00:00 dst {rem} port {port} dev {ifname}'
+ self._cmd(cmd2.format(**self.config))