mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-28 18:28:23 -05:00
P2P: Cancel group formation timeout on group removal (on client)
Group formation timeout is normally canceled when 4-way handshake is completed (WPA_COMPLETED -> wpas_p2p_completed). However, it is possible for the GO to stop the group before this happens (i.e., send Deauthentication frame with reason code 3 before 4-way handshake is completed). This resulted in the group getting removed, but the group formation timeout left behind. The unexpected timeout may then result in undesired termination of the following operation. Fix this by canceling the group formation timeout in wpas_p2p_group_delete() similarly to how group idle timeout was canceled there. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
bd692a8b0e
commit
77dfafd07d
@ -86,6 +86,8 @@ static int wpas_p2p_create_iface(struct wpa_supplicant *wpa_s);
|
||||
static void wpas_p2p_cross_connect_setup(struct wpa_supplicant *wpa_s);
|
||||
static void wpas_p2p_group_idle_timeout(void *eloop_ctx, void *timeout_ctx);
|
||||
static void wpas_p2p_set_group_idle_timeout(struct wpa_supplicant *wpa_s);
|
||||
static void wpas_p2p_group_formation_timeout(void *eloop_ctx,
|
||||
void *timeout_ctx);
|
||||
static void wpas_p2p_fallback_to_go_neg(struct wpa_supplicant *wpa_s,
|
||||
int group_added);
|
||||
static int wpas_p2p_stop_find_oper(struct wpa_supplicant *wpa_s);
|
||||
@ -316,6 +318,10 @@ static int wpas_p2p_group_delete(struct wpa_supplicant *wpa_s,
|
||||
|
||||
if (eloop_cancel_timeout(wpas_p2p_group_idle_timeout, wpa_s, NULL) > 0)
|
||||
wpa_printf(MSG_DEBUG, "P2P: Cancelled P2P group idle timeout");
|
||||
if (eloop_cancel_timeout(wpas_p2p_group_formation_timeout,
|
||||
wpa_s->parent, NULL) > 0)
|
||||
wpa_printf(MSG_DEBUG, "P2P: Cancelled P2P group formation "
|
||||
"timeout");
|
||||
|
||||
if (removal_reason != P2P_GROUP_REMOVAL_SILENT && ssid)
|
||||
wpas_notify_p2p_group_removed(wpa_s, ssid, gtype);
|
||||
|
Loading…
Reference in New Issue
Block a user