]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
wpa_supplicant AP: Disable AP mode on disassoc paths
authorJouni Malinen <j@w1.fi>
Tue, 5 Jul 2011 13:38:30 +0000 (16:38 +0300)
committerJouni Malinen <j@w1.fi>
Tue, 5 Jul 2011 13:38:30 +0000 (16:38 +0300)
Regardless of how the AP mode is disabled, wpa_supplicant_ap_deinit()
must be called. Make sure this happens on all paths by calling the
deinit function from wpa_supplicant_mark_disassoc().

wpa_supplicant/ap.c
wpa_supplicant/events.c

index dddac4469cef5a5e5d1bb90b48cff10d8f643692..b463e9add7e00e59f8ed75867421194cb4a36cc2 100644 (file)
@@ -475,6 +475,7 @@ void wpa_supplicant_ap_deinit(struct wpa_supplicant *wpa_s)
 
        wpa_s->current_ssid = NULL;
        wpa_s->assoc_freq = 0;
+       wpa_s->reassociated_connection = 0;
 #ifdef CONFIG_P2P
        if (wpa_s->ap_iface->bss)
                wpa_s->ap_iface->bss[0]->p2p_group = NULL;
index 8768b17db11c0b3a4b43fa550026c8a696711026..279c2fdd324df5ec339869c3fc1f8de151181228 100644 (file)
@@ -118,6 +118,10 @@ void wpa_supplicant_mark_disassoc(struct wpa_supplicant *wpa_s)
        wpa_s->ibss_rsn = NULL;
 #endif /* CONFIG_IBSS_RSN */
 
+#ifdef CONFIG_AP
+       wpa_supplicant_ap_deinit(wpa_s);
+#endif /* CONFIG_AP */
+
        if (wpa_s->wpa_state == WPA_INTERFACE_DISABLED)
                return;