Message ID | 1338359568-11869-1-git-send-email-arik@wizery.com |
---|---|
State | Superseded |
Headers | show |
On Wed, May 30, 2012 at 9:32 AM, Arik Nemtsov <arik@wizery.com> wrote: > When de-authenticated by an AP, the state of wpa_s should be cleared, > especially the previous bssid. Otherwise, we will use re-assoc packets > when associating to the same AP. This is not according to spec, and some > APs refuse to association. Ping? Regards, Arik
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c index d09be6c..b8b25f6 100644 --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c @@ -2246,6 +2246,18 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event, data->deauth_info.ie, data->deauth_info.ie_len); } + +#ifdef CONFIG_AP + if (wpa_s->ap_iface == NULL) +#endif /* CONFIG_AP */ + { +#ifdef CONFIG_SME + wpa_s->sme.prev_bssid_set = 0; +#endif /* CONFIG_SME */ + wpa_supplicant_set_state(wpa_s, + WPA_DISCONNECTED); + os_memset(wpa_s->bssid, 0, ETH_ALEN); + } } #ifdef CONFIG_AP if (wpa_s->ap_iface && data && data->deauth_info.addr) {