[PATCH] P2P: Skip non p2p interface in p2p_group_remove *

Ilan Peer ilan.peer
Wed Aug 7 03:08:42 PDT 2013


When 'p2p_group_remove *' is called while the station interface
is connected, the flow also disconnects the station interface.
Fix this by skipping non P2P interfaces in the iteration.

Signed-hostap: Ilan Peer <ilan.peer at intel.com>
---
 wpa_supplicant/p2p_supplicant.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c
index 2c363ec..06d331b 100644
--- a/wpa_supplicant/p2p_supplicant.c
+++ b/wpa_supplicant/p2p_supplicant.c
@@ -4132,7 +4132,10 @@ int wpas_p2p_group_remove(struct wpa_supplicant *wpa_s, const char *ifname)
 		while (wpa_s) {
 			prev = wpa_s;
 			wpa_s = wpa_s->next;
-			wpas_p2p_disconnect(prev);
+			if (prev->p2p_group_interface !=
+			    NOT_P2P_GROUP_INTERFACE) {
+				wpas_p2p_disconnect(prev);
+			}
 		}
 		return 0;
 	}
-- 
1.7.10.4




More information about the Hostap mailing list