[PATCH] P2P: cleanup AP callbacks when group removed

Janusz.Dziedzic at tieto.com Janusz.Dziedzic
Mon Oct 10 23:53:34 PDT 2011


This is fix for bug I found with such scenario:

A) p2p_group_add
A) p2p_group_remove wlan0
A) add_n
A) set_n 0 ssid "testap"
A) set_n 0 key_mgmt NONE
A) set_n 0 mode 2
A) set_n 0 frequency 2412
A) enable_n 0

B) try connect to testap

Authentication request will be always rejected because of HOSTAPD_ACL_REJECT and not cleaned callbacks when group removed.


When create P2P_GO we setup hosapd callbacks.
This callbacks should be cleanup when group
removed.

Change-Id: Ie0a291024bbcb5c95dbdd31ed81c72cf942b3b82
---
 wpa_supplicant/p2p_supplicant.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c
index 92bfc41..9af1839 100644
--- a/wpa_supplicant/p2p_supplicant.c
+++ b/wpa_supplicant/p2p_supplicant.c
@@ -3489,6 +3489,11 @@ void wpas_p2p_group_deinit(struct wpa_supplicant *wpa_s)
 {
 	p2p_group_deinit(wpa_s->p2p_group);
 	wpa_s->p2p_group = NULL;
+
+	wpa_s->ap_configured_cb = NULL;
+	wpa_s->ap_configured_cb_ctx = NULL;
+	wpa_s->ap_configured_cb_data = NULL;
+	wpa_s->connect_without_scan = NULL;
 }
 
 
-- 
1.7.0.4
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-P2P-cleanup-AP-callbacks-when-group-removed.patch
Type: application/octet-stream
Size: 980 bytes
Desc: 0001-P2P-cleanup-AP-callbacks-when-group-removed.patch
Url : http://lists.shmoo.com/pipermail/hostap/attachments/20111011/41f2dea9/attachment.obj 



More information about the Hostap mailing list