Page MenuHomeVyOS Platform

vyos-1x: WiFi interfaces as bridge slaves, hostapd config items missing
Closed, InvalidPublicBUG

Description

When configuring WiFi interfaces as bridge slave interfaces, they must be configured to accept a specific address mode. This is explained in https://w1.fi/cgit/hostap/plain/hostapd/hostapd.conf

# For nl80211, this parameter can be used to request the AP interface to be
# 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=br0

# WDS (4-address frame) mode with per-station virtual interfaces
# (only supported with driver=nl80211)
# This mode allows associated stations to use 4-address frames to allow layer 2
# bridging to be used.
#wds_sta=1

This worked in VyOS 1.2 (self-built at 201808072059).

Details

Difficulty level
Normal (likely a few hours)
Version
vyos-1x commit id: 551e41895953bb291fc10bdb9ba2a07e83310070
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)

Event Timeline

This is the logic from my old wireless-hostapd.pl file:

# hostapd option: bridge=<string>
# hostapd option: wds_sta=[0|1]
my $bridge = $config->returnValue('bridge-group bridge');
print "bridge=$bridge\n"  if $bridge;
if ($bridge) {
    print "bridge=$bridge\n";
    print "wds_sta=1\n";
}

Back then, WiFi interfaces were added to a bridge device by:

set interfaces wireless wlanX bridge-group bridge brY

But in VyOS 1.3, this is done from the bridge node:

set interfaces bridge brY member interface wlanX

Therefore, the new logic needs to respect settings in both nodes when generating the hostapd config file.

alainlamar closed this task as Invalid.EditedApr 18 2020, 9:49 PM

The hostapd.conf says that this might not be needed anymore.

# In case of atheros and nl80211 driver interfaces, an additional
# configuration parameter, bridge, may be used to notify hostapd if the
# interface is included in a bridge. This parameter is not used with Host AP
# driver. If the bridge parameter is not set, the drivers will automatically
# figure out the bridge interface (assuming sysfs is enabled and mounted to
# /sys) and this parameter may not be needed.
#
# For nl80211, this parameter can be used to request the AP interface to be
# 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=br0

I have two WiFi interfaces running as members of the same bridge interface for about a week now on VyOS 1.3 and it works without the bridge=br0 stanza.

erkin set Issue type to Bug (incorrect behavior).Aug 30 2021, 7:44 AM
erkin removed a subscriber: Active contributors.