aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2009-12-04 22:09:06 +0200
committerJouni Malinen <j@w1.fi>2009-12-04 22:09:06 +0200
commit9c972abb663a3c782a2e67133ffb1b5a2d745d8a (patch)
treeb339a0b909ef098f58782f8787fe32e753328298
parent0e379654b0d4d8c4393d126c44bff698f3d6a730 (diff)
downloadexternal_wpa_supplicant_8_ti-9c972abb663a3c782a2e67133ffb1b5a2d745d8a.zip
external_wpa_supplicant_8_ti-9c972abb663a3c782a2e67133ffb1b5a2d745d8a.tar.gz
external_wpa_supplicant_8_ti-9c972abb663a3c782a2e67133ffb1b5a2d745d8a.tar.bz2
IBSS RSN: Wait for connection event and do not use auth timeout
Wait for connection (IBSS join completed) event before marking state completed. In addition, do not use the station mode authentication timeout since that can trigger full disconnection from IBSS when there is a timeout with just one of the peers.
-rw-r--r--wpa_supplicant/events.c4
-rw-r--r--wpa_supplicant/wpa_supplicant.c5
2 files changed, 6 insertions, 3 deletions
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index 429eac8..c528390 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -1046,7 +1046,9 @@ static void wpa_supplicant_event_assoc(struct wpa_supplicant *wpa_s,
eapol_sm_notify_portEnabled(wpa_s->eapol, TRUE);
wpa_s->eapol_received = 0;
if (wpa_s->key_mgmt == WPA_KEY_MGMT_NONE ||
- wpa_s->key_mgmt == WPA_KEY_MGMT_WPA_NONE) {
+ wpa_s->key_mgmt == WPA_KEY_MGMT_WPA_NONE ||
+ (wpa_s->current_ssid &&
+ wpa_s->current_ssid->mode == IEEE80211_MODE_IBSS)) {
wpa_supplicant_cancel_auth_timeout(wpa_s);
wpa_supplicant_set_state(wpa_s, WPA_COMPLETED);
} else if (!ft_completed) {
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index 7decd7a..bda436f 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -1244,7 +1244,6 @@ void wpa_supplicant_associate(struct wpa_supplicant *wpa_s,
* per-BSSID authentication.
*/
wpa_supplicant_cancel_auth_timeout(wpa_s);
- wpa_supplicant_set_state(wpa_s, WPA_COMPLETED);
#endif /* CONFIG_IBSS_RSN */
} else {
/* Timeout for IEEE 802.11 authentication and association */
@@ -1774,7 +1773,9 @@ void wpa_supplicant_rx_eapol(void *ctx, const u8 *src_addr,
if (wpa_s->eapol_received == 0 &&
(!(wpa_s->drv_flags & WPA_DRIVER_FLAGS_4WAY_HANDSHAKE) ||
!wpa_key_mgmt_wpa_psk(wpa_s->key_mgmt) ||
- wpa_s->wpa_state != WPA_COMPLETED)) {
+ wpa_s->wpa_state != WPA_COMPLETED) &&
+ (wpa_s->current_ssid == NULL ||
+ wpa_s->current_ssid->mode != IEEE80211_MODE_IBSS)) {
/* Timeout for completing IEEE 802.1X and WPA authentication */
wpa_supplicant_req_auth_timeout(
wpa_s,