From c092d83e268a0e328943b78df1ea05fea9c0de86 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Fri, 1 Nov 2013 10:31:55 +0200 Subject: [PATCH] P2P: Clear pending group formation data on group removal It was possible for the wpa_s->show_group_started and wpa_s->go_params to be left set when a P2P group was removed before group formation had completed. In case a separate P2P group interface was not used, this could rsult in all future scans using the hardcoded DIRECT-* SSID and as such, not find the network they were trying to find. Fix this by clearing these P2P parameters on group removal. Signed-hostap: Jouni Malinen --- wpa_supplicant/p2p_supplicant.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c index 0ebf332ca..f0accde57 100644 --- a/wpa_supplicant/p2p_supplicant.c +++ b/wpa_supplicant/p2p_supplicant.c @@ -469,6 +469,10 @@ static int wpas_p2p_group_delete(struct wpa_supplicant *wpa_s, wpa_s->p2p_in_provisioning = 0; } + wpa_s->show_group_started = 0; + os_free(wpa_s->go_params); + wpa_s->go_params = NULL; + wpa_printf(MSG_DEBUG, "P2P: Remove temporary group network"); if (ssid && (ssid->p2p_group || ssid->mode == WPAS_MODE_P2P_GROUP_FORMATION ||