aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/events.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2013-09-01 18:28:16 (GMT)
committerJouni Malinen <j@w1.fi>2013-09-01 18:35:10 (GMT)
commit5bf9a6c8595fa1aef20e3f45fcd7906fa216a002 (patch)
tree60b480d9a9572ccf42853246cc57df272ffa883e /wpa_supplicant/events.c
parenteac8dab87c92f13d778ea5634a500593540a3d1a (diff)
downloadhostap-5bf9a6c8595fa1aef20e3f45fcd7906fa216a002.zip
hostap-5bf9a6c8595fa1aef20e3f45fcd7906fa216a002.tar.gz
hostap-5bf9a6c8595fa1aef20e3f45fcd7906fa216a002.tar.bz2
P2P: Add event messages for possible PSK failures on P2P groups
It is possible for the GO of a persistent group to change the PSK or remove a client when per-client PSKs are used and this can happen without the SSID changing (i.e., the group is still valid, but just not for a specific client). If the client side of such persistent group ends up trying to use an invalidated persistent group information, the connection will fail in 4-way handshake. A new WPS provisioning step is needed to recover from this. Detect this type of case based on two 4-way handshake failures when acting as a P2P client in a persistent group. A new "P2P-PERSISTENT-PSK-FAIL id=<persistent group id>" event is used to indicate when this happens. This makes it easier for upper layers to remove the persistent group information with "REMOVE_NETWORK <persistent group id>" if desired (e.g., based on user confirmation). In addition to indicating the error cases for persistent groups, all this type of PSK failures end up in the client removing the group with the new reason=PSK_FAILURE information in the P2P-GROUP-REMOVED event. Signed-hostap: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant/events.c')
-rw-r--r--wpa_supplicant/events.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index e9399fe..69e4030 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -2017,6 +2017,8 @@ static void wpa_supplicant_event_disassoc_finish(struct wpa_supplicant *wpa_s,
if (could_be_psk_mismatch(wpa_s, reason_code, locally_generated)) {
wpa_msg(wpa_s, MSG_INFO, "WPA: 4-Way Handshake failed - "
"pre-shared key may be incorrect");
+ if (wpas_p2p_4way_hs_failed(wpa_s) > 0)
+ return; /* P2P group removed */
wpas_auth_failed(wpa_s);
}
if (!wpa_s->disconnected &&