From: Janusz Dziedzic Date: Wed, 12 Oct 2011 18:06:39 +0000 (+0300) Subject: P2P: Cleanup AP callbacks when removing the group X-Git-Tag: hostap-1-bp~178 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a7fd39bb5d422d7bd3135ad965e97d2c1991e3ff;p=thirdparty%2Fhostap.git P2P: Cleanup AP callbacks when removing the group Clear the P2P GO callback parameters when removing the group to avoid using these for non-P2P AP mode. This is a fix for the bug I found in the following 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. --- diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c index 92bfc41db..9af1839f1 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; }