Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#2998 - Bridges does not await wlan interfaces to be ready #7803

openwrt-bot opened this issue Apr 12, 2020 · 1 comment

FS#2998 - Bridges does not await wlan interfaces to be ready #7803

openwrt-bot opened this issue Apr 12, 2020 · 1 comment


Copy link

@openwrt-bot openwrt-bot commented Apr 12, 2020


Affected router: Netgear Nighthawk X4S R7800
Release: OpenWrt SNAPSHOT r12911-e66becb490 / LuCI Master git-20.099.28711-ae5cd59 (Issue also replicated with KONG's latest build KONG 19 2020-01 / LuCI branch git-20.067.56216-e71f6b1)

I have a quite simple use case for my router;

  1. Set up 8 SSIDs (4x 2.4GHz and 4x 5GHz)
  2. Create 5 VLANs tagged on the WAN port
  3. Create 5 interfaces of bridge type to separate each SSID to a VLAN, one VLAN is left over for management.
  4. No "smart" functions are to be handled on the router hardware.

I quickly noticed that wlanX-X interfaces were not correctly attached to bridges on boot. Sample output after a boot;

bridge name bridge id STP enabled interfaces
br-200 7fff.3c37862ac466 no eth0.200
br-300 7fff.3c37862ac466 no eth0.300
br-400 7fff.3c37862ac466 no eth0.400
br-403 7fff.3c37862ac466 no eth0.403
br-500 7fff.3c37862ac466 no eth0.500

Each bridge (except for br-403) should have two wlan interfaces defined according to the interface configuration. On boot I would notice that the list differs from each boot. Subsequently the functionality would completely fail as traffic could not be passed from the SSIDs to the VLANs.

Manually adding the interfaces with brctl addif would solve the issue. As such I would add a manual startup script with a sleep of 60s;

sleep 60
brctl addif br-200 wlan0-1
brctl addif br-200 wlan1-1
brctl addif br-300 wlan0-2
brctl addif br-300 wlan1-2
brctl addif br-400 wlan0
brctl addif br-400 wlan1
brctl addif br-500 wlan0-3
brctl addif br-500 wlan1-3

which would solve the startup problem. It's however a very static configuration prone to other issues. This does not take into consideration following scenarios which would break the bridges again;

  1. Reconfiguration of wireless which brings interfaces down then back up again
  2. Potential bugs causing restart of wireless interfaces

Both of these makes operation very unstable for use.

I am attaching a boot log which shows the interface ready and bridge create states. Also adding a link to my forum openwrt forum post.

Copy link

@openwrt-bot openwrt-bot commented Apr 19, 2020


It turns out that the mistake I made was to create a bridge interface and then attach the defined WLAN adapters to it.

The correct way for making netifd wait for the interface to be created was to in the wlan definition specify the network which it belongs to. This way it will be added to the bridge after the WLAN interface is up.

Improvement point might be that if one way is incorrect doing, maybe it should be blocked / discouraged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

1 participant