aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/wps_supplicant.c
diff options
context:
space:
mode:
authorAvraham Stern <avraham.stern@intel.com>2014-03-27 06:58:30 (GMT)
committerJouni Malinen <j@w1.fi>2014-03-28 17:31:26 (GMT)
commitace0fbdb69b492a3aa6f24d07f0d6d4dffc4b7dc (patch)
tree2fc8d7336750e6a380c2917d5df0a450f1961d91 /wpa_supplicant/wps_supplicant.c
parentcf15b15cc17f3e325ed8bab5effd4389afd35475 (diff)
downloadhostap-ace0fbdb69b492a3aa6f24d07f0d6d4dffc4b7dc.zip
hostap-ace0fbdb69b492a3aa6f24d07f0d6d4dffc4b7dc.tar.gz
hostap-ace0fbdb69b492a3aa6f24d07f0d6d4dffc4b7dc.tar.bz2
P2P: Fix segfault when PBC overlap is detected
If a separate P2P group interface is used, PBC overlap during group formation causes the group interface to be removed, which ends up with the interface context becoming invalid. Fix this by scheduling a timeout to process the PBC overlap and interface removal instead of removing the interface directly before the connection operation has returned. Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Diffstat (limited to 'wpa_supplicant/wps_supplicant.c')
-rw-r--r--wpa_supplicant/wps_supplicant.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/wpa_supplicant/wps_supplicant.c b/wpa_supplicant/wps_supplicant.c
index b086c47..dfcc069 100644
--- a/wpa_supplicant/wps_supplicant.c
+++ b/wpa_supplicant/wps_supplicant.c
@@ -510,15 +510,6 @@ static int wpa_supplicant_wps_cred(void *ctx,
}
-#ifdef CONFIG_P2P
-static void wpas_wps_pbc_overlap_cb(void *eloop_ctx, void *timeout_ctx)
-{
- struct wpa_supplicant *wpa_s = eloop_ctx;
- wpas_p2p_notif_pbc_overlap(wpa_s);
-}
-#endif /* CONFIG_P2P */
-
-
static void wpa_supplicant_wps_event_m2d(struct wpa_supplicant *wpa_s,
struct wps_event_m2d *m2d)
{
@@ -537,7 +528,7 @@ static void wpa_supplicant_wps_event_m2d(struct wpa_supplicant *wpa_s,
* Notify P2P from eloop timeout to avoid issues with the
* interface getting removed while processing a message.
*/
- eloop_register_timeout(0, 0, wpas_wps_pbc_overlap_cb, wpa_s,
+ eloop_register_timeout(0, 0, wpas_p2p_pbc_overlap_cb, wpa_s,
NULL);
}
#endif /* CONFIG_P2P */