summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJernej Jakob <jernej.jakob@gmail.com>2020-05-01 18:02:05 +0200
committerJernej Jakob <jernej.jakob@gmail.com>2020-05-04 22:59:39 +0200
commitea7ba8a636189bb8e2d87f0de995484be55a016e (patch)
treec49ff3ac9e26dfe040e5d4faf862aae733144a1d /src
parent571b162345aa18f440ccd3f02f8b9f4b62a16c8a (diff)
downloadvyos-1x-ea7ba8a636189bb8e2d87f0de995484be55a016e.tar.gz
vyos-1x-ea7ba8a636189bb8e2d87f0de995484be55a016e.zip
dummy: T2241: fix falling out of bridge when changing settings
Previously, set_vrf was always called, which uses the same master and nomaster commands as bridge, so it removed the interface from the bridge. - add checks to make VRF and bridge membership mutually exclusive
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/interfaces-dummy.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/conf_mode/interfaces-dummy.py b/src/conf_mode/interfaces-dummy.py
index 7d266e693..0049442cd 100755
--- a/src/conf_mode/interfaces-dummy.py
+++ b/src/conf_mode/interfaces-dummy.py
@@ -129,8 +129,10 @@ def apply(dummy):
for addr in dummy['address']:
d.add_addr(addr)
- # assign/remove VRF
- d.set_vrf(dummy['vrf'])
+ # assign/remove VRF (ONLY when not a member of a bridge,
+ # otherwise 'nomaster' removes it from it)
+ if not dummy['is_bridge_member']:
+ d.set_vrf(dummy['vrf'])
# disable interface on demand
if dummy['disable']: