Page MenuHomeVyOS Platform

Wireless interface can no longer be added to the bridge after bridge VLAN support
Closed, ResolvedPublicBUG


VyOS had an issue completing a command.

We are sorry that you encountered a problem while using VyOS.
There are a few things you can do to help us (and yourself):
- Make sure you are running the latest version of the code available at
- Consult the forum to see how to handle this issue
- Join our community on slack where our users exchange help and advice

When reporting problems, please include as much information as possible:
- do not obfuscate any data (feel free to contact us privately if your
  business policy requires it)
- and include all the information presented below

Report Time:      2020-11-13 08:39:32
Image Version:    VyOS 1.3-rolling-202011130217
Release Train:    equuleus

Built by:         [email protected]
Built on:         Fri 13 Nov 2020 02:17 UTC
Build UUID:       b19e3986-7349-451b-861c-e6bbd452e4ce
Build Commit ID:  3fa7fe6926a538

Architecture:     x86_64
Boot via:         installed image
System type:      bare metal

Hardware vendor:  PC Engines
Hardware model:   apu4
Hardware S/N:     1360315
Hardware UUID:    Unknown

Traceback (most recent call last):
  File "/usr/libexec/vyos/conf_mode/", line 203, in <module>
  File "/usr/libexec/vyos/conf_mode/", line 194, in apply
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/", line 312, in update
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/", line 51, in _cmd
    return cmd(command, self.debug)
  File "/usr/lib/python3/dist-packages/vyos/", line 179, in cmd
    raise OSError(code, feedback)
OSError: [Errno 255] failed to run command: bridge vlan del dev wlan0 vid 1
exit code: 255

cmd 'bridge vlan del dev wlan0 vid 1'
returned (out):

returned (err):
RTNETLINK answers: Operation not supported

[[interfaces bridge br0]] failed
Commit failed
[email protected]# save
Warning: you have uncommitted changes that will not be saved.

Saving configuration to '/config/config.boot'...


 bridge br0 {
     member {
         interface eth3 {
         interface eth4 {
+        interface wlan0 {
+        }
     vrf black
 dummy dum0 {
 ethernet eth0 {
 ethernet eth1 {
 ethernet eth2 {
 ethernet eth3 {
 wireless wlan0 {
     channel 0
     country-code DE
     physical-device phy0
     security {
         wpa {
             mode wpa2
             passphrase BeMyGuest123
     ssid VYOS-TEST
     type access-point

Wifi can be simulated loading the `mac80211_hwsim` module


Difficulty level
Unknown (require assessment)
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

c-po triaged this task as High priority.
c-po created this task.
This comment was removed by jack9603301.

Strange, the problem seems to be that the interface has not been added to the bridge. I may submit a patch about VLAN awareness to refuse to operate the vlan filter setting without enabling VLAN awareness, but I am not sure whether it has any Relationship, manual operation is normal:

sudo brctl addif wlan0
sudo bridge vlan del dev wlan0 vid 1

图片.png (194×743 px, 3 KB)

I did an experiment and determined that the interface was not added to the bridge normally. The VLAN awareness setting was added to the bridge, but it did not seem to work properly.


This patch changes the settings and does not modify the vlan filter settings when VLAN awareness is not set, but the root cause of different problems is that the following code does not set the wireless port to the bridge normally:

tmp = dict_search('member.interface', config)
        if tmp:
            for interface, interface_config in tmp.items():
                # if interface does yet not exist bail out early and
                # add it later
                if interface not in interfaces():

                # Bridge lower "physical" interface
                lower = Interface(interface)

                # If we've come that far we already verified the interface does
                # not have any addresses configured by CLI so just flush any
                # remaining ones
                # enslave interface port to bridge

Before the VLAN bridge was supported, this error was hidden until the VLAN filter setting failed.

Please merge this PR

# Bridge port handling of wireless interfaces is done by hostapd.
        if 'wlan' in interface:

Why can't wlan be completed in


Contains 2 patch submissions

  • You should not modify the vlan filter settings without setting VLAN awareness
  • You should not refuse to add the wlan port to the bridge in
# Bridge port handling of wireless interfaces is done by hostapd.
        if 'wlan' in interface:

Why can't wlan be completed in

Because hostapd and in the future also wpa_supplicant take care about this.

I can now again bridge the WIFI interface to br0, please resolve the outstanding commit message changes and then it feels good to me! Thanks

@c-po I have changed the PR to prohibit WLAN ports from joining VLAN-aware bridge ports

erkin set Issue type to Bug (incorrect behavior).Aug 29 2021, 12:16 PM
erkin removed a subscriber: Active contributors.