aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
diff options
context:
space:
mode:
authorEyal Shapira <eyal@wizery.com>2012-02-17 00:25:14 +0200
committerArik Nemtsov <arik@wizery.com>2012-08-02 13:03:06 +0300
commit77402712f2b5d0903bb9d5c913bac9adcaeeff8c (patch)
tree56b088d03442f36196fd1960a4c00dcfb6a3a304 /wpa_supplicant
parent8568d248d5adbf150188a5a22b948cbe4fc36ff8 (diff)
downloadexternal_wpa_supplicant_8_ti-77402712f2b5d0903bb9d5c913bac9adcaeeff8c.zip
external_wpa_supplicant_8_ti-77402712f2b5d0903bb9d5c913bac9adcaeeff8c.tar.gz
external_wpa_supplicant_8_ti-77402712f2b5d0903bb9d5c913bac9adcaeeff8c.tar.bz2
Ignore a deauth from a different BSS than the current one
This fixes an issue with roaming where the previous BSS would send a DEAUTH during the roaming and this would caused the supplicant to disconnect.
Diffstat (limited to 'wpa_supplicant')
-rw-r--r--wpa_supplicant/events.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index 0f4cbfd..f834cb4 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -1737,7 +1737,8 @@ static int disconnect_reason_recoverable(u16 reason_code)
static void wpa_supplicant_event_disassoc(struct wpa_supplicant *wpa_s,
u16 reason_code,
- int locally_generated)
+ int locally_generated,
+ const u8 *addr)
{
const u8 *bssid;
int authenticating;
@@ -1759,6 +1760,13 @@ static void wpa_supplicant_event_disassoc(struct wpa_supplicant *wpa_s,
return;
}
+ if (addr && wpa_s->bssid && os_memcmp(wpa_s->bssid, addr, ETH_ALEN)) {
+ /* This may occur during roaming */
+ wpa_dbg(wpa_s, MSG_DEBUG, "Ignore disconnect from"
+ " a BSS which is not the current one");
+ return;
+ }
+
if (wpa_s->wpa_state == WPA_4WAY_HANDSHAKE &&
wpa_key_mgmt_wpa_psk(wpa_s->key_mgmt)) {
wpa_msg(wpa_s, MSG_INFO, "WPA: 4-Way Handshake failed - "
@@ -2331,8 +2339,10 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
" with reason=2");
wpa_s->ignore_deauth_event = 0;
} else {
- wpa_supplicant_event_disassoc(wpa_s, reason_code,
- locally_generated);
+ wpa_supplicant_event_disassoc(wpa_s,
+ reason_code,
+ locally_generated,
+ data->deauth_info.addr);
}
break;
case EVENT_MICHAEL_MIC_FAILURE: