diff options
author | Jouni Malinen <jouni@qca.qualcomm.com> | 2013-09-02 13:33:42 (GMT) |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2013-09-02 13:33:42 (GMT) |
commit | 813e7b364fc765e2a22ee2188c4363335079b53a (patch) | |
tree | 92e3f202648a95708a608611ff962460f83bd3b9 /wpa_supplicant | |
parent | 18b12b56c130a303f64c717d8d89df01f6b9cfdb (diff) | |
download | hostap-813e7b364fc765e2a22ee2188c4363335079b53a.zip hostap-813e7b364fc765e2a22ee2188c4363335079b53a.tar.gz hostap-813e7b364fc765e2a22ee2188c4363335079b53a.tar.bz2 |
P2P: Remove group from timeout on PSK failure
Avoid potential issues with removing a P2P group on PSK failure directly
from the wpa_supplicant_event() call since the caller (in driver_*.c)
may not be prepared for the interface disappearing at that point in
time.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant')
-rw-r--r-- | wpa_supplicant/p2p_supplicant.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c index c0e8651..4b941c7 100644 --- a/wpa_supplicant/p2p_supplicant.c +++ b/wpa_supplicant/p2p_supplicant.c @@ -6255,6 +6255,13 @@ void wpas_p2p_remove_client(struct wpa_supplicant *wpa_s, const u8 *peer, } +static void wpas_p2p_psk_failure_removal(void *eloop_ctx, void *timeout_ctx) +{ + struct wpa_supplicant *wpa_s = eloop_ctx; + wpas_p2p_group_delete(wpa_s, P2P_GROUP_REMOVAL_PSK_FAILURE); +} + + int wpas_p2p_4way_hs_failed(struct wpa_supplicant *wpa_s) { struct wpa_ssid *ssid = wpa_s->current_ssid; @@ -6288,7 +6295,13 @@ int wpas_p2p_4way_hs_failed(struct wpa_supplicant *wpa_s) persistent->id); disconnect: wpa_s->p2p_last_4way_hs_fail = NULL; - wpas_p2p_group_delete(wpa_s, P2P_GROUP_REMOVAL_PSK_FAILURE); + /* + * Remove the group from a timeout to avoid issues with caller + * continuing to use the interface if this is on a P2P group + * interface. + */ + eloop_register_timeout(0, 0, wpas_p2p_psk_failure_removal, + wpa_s, NULL); return 1; } |