[pkg-wpa-devel] Bug#600589: hostapd+bridge doesn't work if hostapd is not run as a daemon in squeeze

FEJES Jozsef fejes at joco.name
Sat Oct 23 06:50:19 UTC 2010


So basically, if I do bridge first, then run hostapd as a daemon, it 
used to work, but with a newer kernel it doesn't, because the bridge 
needs wlan0 to be in master mode already, which is the job of hostapd. 
If I do hostapd first via /etc/network/interfaces, then the bridge from 
the same file, then everything starts up without an error, but I can't 
do WPA, only after I restart hostapd.

I found a workaround for the first case: "iwconfig wlan0 mode master" 
doesn't work, but "pre-up iw dev wlan0 set type __ap" does the job. It 
sets the card to master mode, then the bridge can be set up, then 
hostapd starts as a daemon and everything is working fine again.

So now the real problem remains, the second case: if hostapd is run from 
/etc/network/interfaces and I set up a bridge in the same file, then 
hostapd either doesn't receive EAPOL responses or sends the EAPOL 
requests to the wrong place and I get EAPOL timeouts in the syslog. 
Bottom line: no WPA.

Check this interfaces file:

iface eth0 inet manual
iface wlan0 inet manual
   hostapd /etc/hostapd/hostapd.conf
iface br0 inet static
   bridge-ports eth0 wlan0

I'm guessing what it does is this: bring up eth0, then run hostapd in 
the pre-up stage, then bring up wlan0, then bring up the bridge. The 
problem could be that hostapd doesn't see the bridge when it starts up, 
or some property of the bridge or wlan0 changes after it started up.

I grabbed myself a hostapd source code, so if you could give some 
pointers where to look, I'd be glad to help. How do I debug where it 
sends EAPOL requests? How do I debug where it expects EAPOL responses from?





More information about the Pkg-wpa-devel mailing list