summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJernej Jakob <jernej.jakob@gmail.com>2020-05-01 20:03:02 +0200
committerJernej Jakob <jernej.jakob@gmail.com>2020-05-04 22:59:40 +0200
commit0e369db49f7b51c175a458dbc32215fbed4ad5a0 (patch)
treed01f4e401df94b09a0e26f977b8d0231fa9d942b
parent91762a9c10d3cc047c5a0938fe9827688fcdd5c0 (diff)
downloadvyos-1x-0e369db49f7b51c175a458dbc32215fbed4ad5a0.tar.gz
vyos-1x-0e369db49f7b51c175a458dbc32215fbed4ad5a0.zip
wireless: 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
-rwxr-xr-xsrc/conf_mode/interfaces-wireless.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/conf_mode/interfaces-wireless.py b/src/conf_mode/interfaces-wireless.py
index 99f5323d6..962238273 100755
--- a/src/conf_mode/interfaces-wireless.py
+++ b/src/conf_mode/interfaces-wireless.py
@@ -706,8 +706,10 @@ def apply(wifi):
# Finally create the new interface
w = WiFiIf(interface, **conf)
- # assign/remove VRF
- w.set_vrf(wifi['vrf'])
+ # assign/remove VRF (ONLY when not a member of a bridge,
+ # otherwise 'nomaster' removes it from it)
+ if not wifi['is_bridge_member']:
+ w.set_vrf(wifi['vrf'])
# update interface description used e.g. within SNMP
w.set_alias(wifi['description'])