Search Linux Wireless

Re: [PATCH v3] cfg80211: merge in beacon ies of hidden bss.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2011-11-04 at 17:12 +0100, Dmitry Tarnyagin wrote:
> The problem with PSM when a hidden SSID was used was originally
> reported by Juuso Oikarinen.
> 
>  - When generally scanning, the AP is getting a bss entry with
>    a zero SSID.

And maybe one with the probe reply too, if you do a scan with the SSID,
but anyway.

>  - When associationg, a probe-req is sent to the AP with the SSID,

associating :-)

>    and as a result a probe-responseis received with the hidden

probe-response is

>    SSID in place. As a consequence, a second bss entry is created
>    for the AP, now with the real SSID.
>  - After association, mac80211 executes ieee80211_recalc_ps(),
>    but does not switch to powersave because the beacon-ies are missing.
> 
> As result, the STA does not ever enter PSM.
> 
> The patch merges in beacon ies of hidden bss from beacon to the probe
> response, creating a consistant set of ies in place.

consistent

> Patch is depended on "cfg80211: fix cmp_ies" made by Johannes.

Thanks. This looks fine to me.

> +	/* sort by length first, then by contents */
> +	if (ie1[1] != ie2[1])
> +		return ie2[1] - ie1[1];
> +
> +	/* zeroed SSID ie is another indication of a hidden bss */
> +	for (i = 0; i < ie2[1]; i++)
> +		if (ie2[i + 2])
> +			return -1;

The "return -1" here seems to be correct, but tricky -- maybe it
warrants a comment?

(I'm also thinking that maybe hashing the SSID into the tree was a bad
idea?)


One thing just occurred to me: This patch doesn't make the problem go
away, it just makes it less likely. Consider this: you ask to connect to
an AP with hidden SSID without scanning first. The scan for this AP
happens so quickly that you don't receive a beacon at all, you only
receive a probe response because the scan falls between two beacons.

In that case, the BSS entry will never be updated to get beacon IEs, so
you will still never enter powersave, because the beacon IEs weren't
present when the BSS entry was created.

You can probably reproduce that case easily by using a large beacon
interval, say 1 second.

To fix this, we need to address the TODO item.

johannes

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux