diff mbox

problems setting up 3 ssids in hostapd (solved)

Message ID 4F4B5DBC.4010400@dsa-ac.de
State Not Applicable
Headers show

Commit Message

Tilman Schoop Feb. 27, 2012, 10:41 a.m. UTC
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

Comments

Helmut Schaa Feb. 27, 2012, 3:43 p.m. UTC | #1
On Mon, Feb 27, 2012 at 11:41 AM, Tilman Schoop <tilman.schoop@dsa-ac.de> wrote:
> 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.

Yep, that's a hw (not driver) limitation. rt2800 devices can only
distinguish BSSIDs
by the last 4 bits.

Helmut
diff mbox

Patch

================================================================================
--- 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);