FW: [wpa_supplicant] Most WPA AP:s dont get to WPA_4WAY_HANDSHAKE state when wrong PSK is supplied

Olsson, Ola1 Ola1.Olsson
Sun Dec 5 00:46:26 PST 2010


Sorry for bad explanation.
My problems only exist when typing the wrong PSK, when typing the correct PSK, everything works fine. 

The only way for upper layers on Android to know that the PSK is wrong is when the warning "pre-shared key may be incorrect" is printed.
For some AP:s I will get to the 4-way handshake before I get the disconnect event, and in this case, everything is also fine. But, a lot of AP:s will just trigger disassociate when we are in associate-state and as we all know, we wont get the string printed in that case.

Have you seen this behaviour?

Do you know any side effects of trigger the print when getting EVENT_DISASSOC in associating state? That will solve my problem at least.

Best regards, Ola

-----Original Message-----
From: hostap-bounces at lists.shmoo.com [mailto:hostap-bounces at lists.shmoo.com] On Behalf Of Jouni Malinen
Sent: l?rdag den 4 december 2010 20:53
To: hostap at lists.shmoo.com
Subject: Re: FW: [wpa_supplicant] Most WPA AP:s dont get to WPA_4WAY_HANDSHAKE state when wrong PSK is supplied

On Sat, Dec 04, 2010 at 12:50:23PM +0100, Olsson, Ola1 wrote:
> The behaviour I get in most cases is that I get my phone in state ASSOCIATING and then get EVENT_DISASSOC from wpa_driver_wext_event_wireless() in driver_wext.c after evaluating that the is_zero_ether_addr() evaluates to true.
> My question is:
> *Why don't we treat this 00:00:00:00:00:00 mac address as erroneous PSK even though we are only in ASSOCIATING state? When changing the code in events.c to also send the callback when in ASSOCIATING, it works perfectly. I'm a little bit worried of the side effects though. Anybody who knows what might go wrong?

I'm not sure I fully understood your description, but if you are saying
that you get disconnected even before association, there is no way of
knowing whether the PSK was correct or not. That warning is only shown
if the connection attempt fails during 4-way handshake. ASSOCIATING
state should only be used before 4-way handshake.

Jouni Malinen                                            PGP id EFC895FA
HostAP mailing list
HostAP at lists.shmoo.com

More information about the Hostap mailing list