[PATCH] nl80211: report new station / assoc event for the correct BSS

Jouni Malinen j
Sun Dec 14 07:46:29 PST 2014


On Sun, Dec 14, 2014 at 10:25:45AM +0100, Arend van Spriel wrote:
> On 12/13/14 23:31, Rafa? Mi?ecki wrote:
> >On 6 December 2014 at 16:06, Rafa? Mi?ecki<zajec5 at gmail.com>  wrote:
> >>drv->ctx always points to the first BSS and we should report event using
> >>BSS related to the interface we got NL80211_CMD_NEW_STATION from.
> >>This fixes STA association for drivers using NL80211_CMD_NEW_STATION and
> >>multiple virtual interfaces.

> >>As you can see in the log called "Before", hostapd was getting event from
> >>wlan0-1 but then association was happening on the wlan0. This was breaking AP
> >>mode on virtual interfaces (BSS other than the first one).

> >>If you review this patch and it appears to be OK, I guess we will need similar
> >>modification for other events.

> I would say you are right in your analysis. I have not tried this
> patch. I will ask Hante as he added Multiple-BSSID support. I assume
> this bug is not visible to any mac80211-based driver, right?

I think this is the first time I've heard of anyone using the multi-BSS
design where multiple BSSes are maintained within a single struct
hostapd_data instance with a driver that does not use hostapd as the AP
SME and MLME.  As such, this is getting to areas that have never been
even assumed to work.. Not that I have anything against making this
work, but it should be understood that this was not part of the criteria
for the event message design and yes, this would indeed require fixing
number of other places as well.

In practice, all cases where the driver takes care of authentication and
association frame exchanges have used multi-BSS design in a way that
hostapd gets two "radios" configured (e.g., two configuration files on
the command line, each pointing to a separate virtual interface). I'd
assume that could be used with nl80211 as well, but it may be reasonable
to extend the internal BSS control case (bss=<ifname> in hostapd.conf)
to provide a more consistent alternative for all drivers using the
nl80211 interface.

-- 
Jouni Malinen                                            PGP id EFC895FA



More information about the Hostap mailing list