problems setting up 3 ssids in hostapd (solved)

Tilman Schoop tilman.schoop at dsa-ac.de
Mon Feb 27 05:41:00 EST 2012


Hi Jouni,

thanks for you answer.

Am 24.02.2012 22:38, schrieb Jouni Malinen:
> On Thu, Feb 23, 2012 at 07:51:41PM +0100, Tilman Schoop wrote:
>> I am trying to setup multiple bssids with hostapd and I have had success setting
>> up 2 SSIDs, but when I configure a third interface and ssid configuration, I can
>> only connect to the last one.
> 
> Which driver and driver/kernel version are you you using?
> 
>> btw. I am trying this with version v0.7.3 of hostapd.
> 
> I would suggest testing with the current snapshot from hostap.git. There
> has been huge number of improvements in the area how nl80211 is used
> since 0.7.3.
> 

At the moment I work with hostapd v0.7.3, Kernel v3.0.0 and wlan driver
rt2800usb (via -D nl80211).

We have solved the problem as follows:
hostapd calculates the common mask of the bssids in the game correctly, but it
seems that the firmware only accepts a mask of FF:*:F8 for the package
acceptance. This mask does not cover my testcase *:F6 (mac adress) plus bssids
*:F7 and *:F8 :( . Staying in the three bit mask and defining bssid *:F0 instead
of the last one let me work fine with 3 ssids.

When examining this situation with hostapd running in foreground I found that it
did not terminate correctly, because of keeping in an endless loop and not
taking down the wlan0_2 interface. Logs of the termination situation looked like
this:

Signal 2 received - terminating
Flushing old station entries
Deauthenticate all stations
Flushing old station entries
Deauthenticate all stations
nl80211: wpa_driver_nl80211_if_remove(type=2 ifname=wlan0_1) ifindex=50
nl80211: Remove interface ifindex=50
eloop: could not process SIGINT or SIGTERM in two seconds. Looks like there
is a bug that ends up in a busy loop that prevents clean shutdown.
Killing program forcefully.

In order to do a clean shutdown of all interfaces, I want to provide you the
following patch.

when I find some time, I will try the develop version in this scenario too.

Regards

Tilman Schoop

================================================================================
--- driver_nl80211.c.orig	2012-02-27 11:15:56.000000000 +0100
+++ driver_nl80211.c	2012-02-24 15:26:26.000000000 +0100
@@ -4927,8 +4927,10 @@
 		struct i802_bss *tbss = &drv->first_bss;

 		while (tbss) {
-			if (tbss->next != bss)
+			if (tbss->next != bss) {
+				tbss = tbss->next;
 				continue;
+			}

 			tbss->next = bss->next;
 			os_free(bss);




More information about the HostAP mailing list