]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
P2P: Clear pending group formation data on group removal
authorJouni Malinen <jouni@qca.qualcomm.com>
Fri, 1 Nov 2013 08:31:55 +0000 (10:31 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 1 Nov 2013 08:31:55 +0000 (10:31 +0200)
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 <jouni@qca.qualcomm.com>

wpa_supplicant/p2p_supplicant.c

index 0ebf332ca51c27df6b64d0356dced6ef91babedd..f0accde57a3097ca23cb71872e16b13b69de7b5c 100644 (file)
@@ -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 ||