From patchwork Mon Feb 27 10:41:00 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tilman Schoop X-Patchwork-Id: 143173 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from maxx.maxx.shmoo.com (maxx.shmoo.com [205.134.188.171]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "maxx.shmoo.com", Issuer "CA Cert Signing Authority" (not verified)) by ozlabs.org (Postfix) with ESMTPS id C21D4B6EF3 for ; Mon, 27 Feb 2012 21:41:17 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 0DC349C127; Mon, 27 Feb 2012 05:41:13 -0500 (EST) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LT7SiJRL9-L0; Mon, 27 Feb 2012 05:41:12 -0500 (EST) Received: from maxx.shmoo.com (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 0BD739C12A; Mon, 27 Feb 2012 05:41:09 -0500 (EST) X-Original-To: mailman-post+hostap@maxx.shmoo.com Delivered-To: mailman-post+hostap@maxx.shmoo.com Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 6B7EF9C12A for ; Mon, 27 Feb 2012 05:41:07 -0500 (EST) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id L5O2Tf4QdkRk for ; Mon, 27 Feb 2012 05:41:02 -0500 (EST) Received: from mail.dsa-ac.de (mail.dsa-ac.de [62.112.80.99]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id EA5F29C127 for ; Mon, 27 Feb 2012 05:41:01 -0500 (EST) Received: from localhost (unknown [127.0.0.1]) by mail.dsa-ac.de (Postfix) with ESMTP id A60467F1C for ; Mon, 27 Feb 2012 10:41:00 +0000 (UTC) Received: from mail.dsa-ac.de ([127.0.0.1]) by localhost (mailserver [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 12312-02; Mon, 27 Feb 2012 11:41:00 +0100 (CET) Received: from [172.29.17.10] (PCTS2.dsa-ac.de [172.29.17.10]) by mail.dsa-ac.de (Postfix) with ESMTP id 61C377EE0 for ; Mon, 27 Feb 2012 11:41:00 +0100 (CET) Message-ID: <4F4B5DBC.4010400@dsa-ac.de> Date: Mon, 27 Feb 2012 11:41:00 +0100 From: Tilman Schoop Organization: DSA GmbH User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.24) Gecko/20100411 Lightning/0.9 Thunderbird/2.0.0.24 Mnenhy/0.7.6.666 MIME-Version: 1.0 To: hostap@lists.shmoo.com Subject: Re: problems setting up 3 ssids in hostapd (solved) References: <4F468ABD.9040403@dsa-ac.de> <20120224213857.GD15042@w1.fi> In-Reply-To: <20120224213857.GD15042@w1.fi> X-Enigmail-Version: 1.1.2 X-Virus-Scanned: by amavisd-new at dsa-ac.de X-BeenThere: hostap@lists.shmoo.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: HostAP Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: hostap-bounces@lists.shmoo.com Errors-To: hostap-bounces@lists.shmoo.com 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);