I've followed the guide [https://wiki.debian.org/BridgeNetworkCo ... reless_NIC] to try to configure qemu with bridging capabilities, so my virtual machines could be seen as standalone machines in my network. This is working fine when using a eth0 cable interface, but fails when trying to do the same with wlan0 wireless interface. I've configured ebtables properly and done everything needed to make it work, but the error boils down to not being able to add wlan0 to the bridge br0:
If I strace the same command, I get the following.# brctl addif br0 wlan0
can't add wlan0 to bridge br0: Operation not supported
I've encountered a number of referenced on this problem, but none of them actually solved the problem.# strace brctl addif br0 wlan0 [8/917]
execve("/sbin/brctl", ["brctl", "addif", "br0", "wlan0"], [/* 57 vars */]) = 0 [7/917]
brk(0) = 0x2435230 [6/917]
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2db8185b000 [5/917]
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) [4/917]
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3 [3/917]
fstat(3, {st_mode=S_IFREG|0644, st_size=269358, ...}) = 0 [2/917]
mmap(NULL, 269358, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2db81819000 [1/917]
close(3) = 0 [0/917]
open("/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\240%\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1732760, ...}) = 0
mmap(NULL, 3846144, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2db81291000
mprotect(0x2db81432000, 2097152, PROT_NONE) = 0
mmap(0x2db81632000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1a1000) = 0x2db81632000
mmap(0x2db81638000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2db81638000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2db81818000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2db81817000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2db81816000
arch_prctl(ARCH_SET_FS, 0x2db81817700) = 0
mprotect(0x2db81632000, 16384, PROT_READ) = 0
mprotect(0x606000, 4096, PROT_READ) = 0
mprotect(0x2db8185d000, 4096, PROT_READ) = 0
munmap(0x2db81819000, 269358) = 0
socket(PF_FILE, SOCK_STREAM, 0) = 3
access("/proc/net", R_OK) = 0
access("/proc/net/unix", R_OK) = 0
socket(PF_FILE, SOCK_DGRAM|SOCK_CLOEXEC, 0) = 4
ioctl(4, SIOCGIFINDEX, {ifr_name="wlan0", ifr_index=4}) = 0
close(4) = 0
ioctl(3, SIOCBRADDIF, 0x397e0b41fe0) = -1 EOPNOTSUPP (Operation not supported)
ioctl(3, SIOCDEVPRIVATE, 0x397e0b41fe0) = -1 EOPNOTSUPP (Operation not supported)
write(2, "can't add wlan0 to bridge br0: O"..., 55can't add wlan0 to bridge br0: Operation not supported
) = 55
exit_group(1) = ?
+++ exited with 1 +++
- Hostapd: I could use hostapd to create AP with my wlan0 and then the qemu clients would connect to that, but I don't want to create an AP, which would then be seen by everybody close enough, so this option is out of the question.
- Old Kernel: I've been told that this is supported by an old kernel, but new kernels don't support it, because it was kicked out of the kernel. I would like to know why the decision was made and what is the latest kernel that still supports it.
I'm using the following kernel driver:# uname -r
3.10.1-hardened-r1
I would like to get a solution to make the qemu virtual machines use bridging to present to the network as standalone clients; the same as it's with the Virtualbox bridging mode.# lspci -k
03:00.0 Network controller: Intel Corporation PRO/Wireless 5100 AGN [Shiloh] Network Connection
Subsystem: Intel Corporation WiFi Link 5100 AGN
Kernel driver in use: iwlwifi
Kernel modules: iwlwifi
Any ideas and th[/url]oughts are welcome.

