summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-11-03 17:12:25 +0100
committerChristian Poessinger <christian@poessinger.com>2020-11-03 17:12:25 +0100
commit3c03131f6caa3e1abd11bb91d0ce972bd37d9239 (patch)
tree25c701fe0fc40b754a50e208a190d64e0f4a2b3a
parentc3fc9ee32a43b938dc44fa41d98bfcc95fdbd359 (diff)
downloadvyos-1x-3c03131f6caa3e1abd11bb91d0ce972bd37d9239.tar.gz
vyos-1x-3c03131f6caa3e1abd11bb91d0ce972bd37d9239.zip
ifconfig: T2985: fix wireless-bridge creation
-rw-r--r--data/templates/wifi/hostapd.conf.tmpl5
-rw-r--r--python/vyos/ifconfig/bridge.py4
2 files changed, 8 insertions, 1 deletions
diff --git a/data/templates/wifi/hostapd.conf.tmpl b/data/templates/wifi/hostapd.conf.tmpl
index c5e4240d1..ba1453583 100644
--- a/data/templates/wifi/hostapd.conf.tmpl
+++ b/data/templates/wifi/hostapd.conf.tmpl
@@ -23,7 +23,10 @@ interface={{ ifname }}
# added to the bridge automatically (brctl may refuse to do this before hostapd
# has been started to change the interface mode). If needed, the bridge
# interface is also created.
-bridge={{ is_bridge_member }}
+{# as there can only be one bridge interface it is save to loop #}
+{% for bridge in is_bridge_member %}
+bridge={{ bridge }}
+{% endfor %}
{% endif %}
# Driver interface type (hostap/wired/none/nl80211/bsd);
diff --git a/python/vyos/ifconfig/bridge.py b/python/vyos/ifconfig/bridge.py
index f7388b298..bd43d4874 100644
--- a/python/vyos/ifconfig/bridge.py
+++ b/python/vyos/ifconfig/bridge.py
@@ -177,6 +177,10 @@ class BridgeIf(Interface):
>>> BridgeIf('br0').add_port('eth0')
>>> BridgeIf('br0').add_port('eth1')
"""
+ # Bridge port handling of wireless interfaces is done by hostapd.
+ if 'wlan' in interface:
+ return
+
return self.set_interface('add_port', interface)
def del_port(self, interface):