mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-28 10:18:21 -05:00
P2P: Report group removal reason PSK_FAILURE in timeout case
It was possible for group formation timeout to be the trigger for detecting the second PSK/4-way handshake failure. If that happened, the special reason=PSK_FAILURE was not used in the P2P-GROUP-REMOVED event even though P2P-PERSISTENT-PSK-FAIL did get reported. Fix this special case by replacing the reason code with PSK_FAILURE if the PSK failure timeout gets registed as part of the disconnection processing in the formation timeout handler. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
64502039c0
commit
debb2dacac
@ -467,8 +467,17 @@ static int wpas_p2p_group_delete(struct wpa_supplicant *wpa_s,
|
||||
if (removal_reason != P2P_GROUP_REMOVAL_SILENT && ssid)
|
||||
wpas_notify_p2p_group_removed(wpa_s, ssid, gtype);
|
||||
|
||||
if (os_strcmp(gtype, "client") == 0)
|
||||
if (os_strcmp(gtype, "client") == 0) {
|
||||
wpa_supplicant_deauthenticate(wpa_s, WLAN_REASON_DEAUTH_LEAVING);
|
||||
if (eloop_is_timeout_registered(wpas_p2p_psk_failure_removal,
|
||||
wpa_s, NULL)) {
|
||||
wpa_printf(MSG_DEBUG,
|
||||
"P2P: PSK failure removal was scheduled, so use PSK failure as reason for group removal");
|
||||
removal_reason = P2P_GROUP_REMOVAL_PSK_FAILURE;
|
||||
eloop_cancel_timeout(wpas_p2p_psk_failure_removal,
|
||||
wpa_s, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
if (wpa_s->cross_connect_in_use) {
|
||||
wpa_s->cross_connect_in_use = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user