Package: bridge-utils
Version: 1.5-9
Severity: wishlist

I currently have a successful 802.11 wireless bridge setup, but I have a 
problem which I feel is best resolved within the bridge-utils package.

In order to support ethernet bridging over 802.11 wifi networks, the wlan 
interface must be configured to support 4-address ethernet frames (sometimes 
incorrectly called "WDS").

The command to enable this is as follows:

iw dev wlan0 set 4addr on

Assuming our 802.11 interface is named "wlan0".

It would be reasonable to set this as a pre-up command in the 
/etc/networking/interfaces config file, but it is (currently) possible that the 
device node for wlan0 doesn't even exist yet because the networking init script 
proceeds when "udevadm settle" returns, which can happen BEFORE the device 
actually exists. This results in an error message, the command is not applied, 
and our wireless bridge fails.

An ugly workaround is to do the following in the interfaces bridge config:

        pre-up while ! [ -e /sys/class/net/wlan0 ] ; do sleep 0.25 ; done && iw 
dev wlan0 set 4addr on

This will wait until the /sys/class/net/wlan0 device exists before the next 
command is run, but it's not pretty.

This is exactly what the "bridge_waitport" command does, so it would be better 
to do this internally in the bridge-utils package.

Finally, it's not possible to add a wlan interface to a bridge without 4addr on 
being set anyway, because brctrl throws an error:

"can't add wlan0 to bridge br0: Operation not supported"

So, we might as well automatically do it within the bridge-utils script, right?



For your entertainment, this is what my interfaces config looks like with a 
bridge between eth0 and wlan0. The host is using br0 as it's primary IP 
interface, using DHCP, and WPA2 for authentication:

auto br0
iface br0 inet dhcp
        pre-up while ! [ -e /sys/class/net/wlan0 ] ; do sleep 0.25 ; done
        pre-up iw dev wlan0 set 4addr on
        pre-up iw dev wlan0 set power_save off
        post-down iw dev wlan0 set 4addr off
        bridge_ports wlan0 eth0
        bridge_stp off
        bridge_waitport 5
        bridge_fd 0
        wpa-ssid SPACEBALLS
        wpa-psk 12345
        wpa-iface wlan0
        wpa-bridge br0




-- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.3.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages bridge-utils depends on:
ii  libc6  2.21-6

bridge-utils recommends no packages.

Versions of packages bridge-utils suggests:
ii  ifupdown  0.8.8

-- debconf-show failed

Reply via email to