From: Jouni Malinen Date: Fri, 5 Oct 2012 17:37:49 +0000 (+0300) Subject: P2P: Fix network removal on P2P connect to select correct block X-Git-Tag: hostap_2_0~183 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6d22a377bddad23ea79191546f84282ed889cc8a;p=thirdparty%2Fhostap.git P2P: Fix network removal on P2P connect to select correct block If wpa_s->current_ssid is not set (e.g., after disconnection that did not result in immediate group removal), an incorrect group could have been removed since the network block iteration here could select the network block that is used to store persistent group credentials. Fix this by verifying that disabled != 2 to avoid picking the network block that could not have been the temporary P2P group. Signed-hostap: Jouni Malinen --- diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c index 996404752..06cbaf584 100644 --- a/wpa_supplicant/p2p_supplicant.c +++ b/wpa_supplicant/p2p_supplicant.c @@ -260,7 +260,7 @@ static int wpas_p2p_group_delete(struct wpa_supplicant *wpa_s, */ ssid = wpa_s->conf->ssid; while (ssid) { - if (ssid->p2p_group) + if (ssid->p2p_group && ssid->disabled != 2) break; ssid = ssid->next; }