aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEliad Peller <eliad@wizery.com>2012-07-19 13:07:35 +0300
committerArik Nemtsov <arik@wizery.com>2012-08-02 13:00:26 +0300
commitfb5f2ec529fd837e3eac7f4484d020c691e9634f (patch)
tree112dff1b56fe197ee9fb1f86aa0d339f7da433e6 /src
parent514536266699cdd5fc113de3e3bef5155313b6d9 (diff)
downloadexternal_wpa_supplicant_8_ti-fb5f2ec529fd837e3eac7f4484d020c691e9634f.zip
external_wpa_supplicant_8_ti-fb5f2ec529fd837e3eac7f4484d020c691e9634f.tar.gz
external_wpa_supplicant_8_ti-fb5f2ec529fd837e3eac7f4484d020c691e9634f.tar.bz2
ap: add missing WLAN_STA_ASSOC_REQ_OK flag cleanups
cleanup of WLAN_STA_ASSOC_REQ_OK flag is missing in some places (e.g. when deauth a sta). (This in turn caused problems when working as GO, as our internal commit (a3e0a16 "Fix deauth with reason 7 due to multiple assoc_req received") caused reassociations (after WPS) to get dropped. Signed-off-by: Eliad Peller <eliad@wizery.com>
Diffstat (limited to 'src')
-rw-r--r--src/ap/drv_callbacks.c3
-rw-r--r--src/ap/sta_info.c8
2 files changed, 6 insertions, 5 deletions
diff --git a/src/ap/drv_callbacks.c b/src/ap/drv_callbacks.c
index cf06a4f..27fc7d5 100644
--- a/src/ap/drv_callbacks.c
+++ b/src/ap/drv_callbacks.c
@@ -250,7 +250,8 @@ void hostapd_notif_disassoc(struct hostapd_data *hapd, const u8 *addr)
}
ap_sta_set_authorized(hapd, sta, 0);
- sta->flags &= ~(WLAN_STA_AUTH | WLAN_STA_ASSOC);
+ sta->flags &= ~(WLAN_STA_AUTH | WLAN_STA_ASSOC |
+ WLAN_STA_ASSOC_REQ_OK);
wpa_auth_sm_event(sta->wpa_sm, WPA_DISASSOC);
sta->acct_terminate_cause = RADIUS_ACCT_TERMINATE_CAUSE_USER_REQUEST;
ieee802_1x_notify_port_enabled(sta->eapol_sm, 0);
diff --git a/src/ap/sta_info.c b/src/ap/sta_info.c
index 95b701c..0e52690 100644
--- a/src/ap/sta_info.c
+++ b/src/ap/sta_info.c
@@ -385,7 +385,7 @@ void ap_handle_timer(void *eloop_ctx, void *timeout_ctx)
break;
case STA_DISASSOC:
ap_sta_set_authorized(hapd, sta, 0);
- sta->flags &= ~WLAN_STA_ASSOC;
+ sta->flags &= ~(WLAN_STA_ASSOC | WLAN_STA_ASSOC_REQ_OK);
ieee802_1x_notify_port_enabled(sta->eapol_sm, 0);
if (!sta->acct_terminate_cause)
sta->acct_terminate_cause =
@@ -565,7 +565,7 @@ void ap_sta_disassociate(struct hostapd_data *hapd, struct sta_info *sta,
{
wpa_printf(MSG_DEBUG, "%s: disassociate STA " MACSTR,
hapd->conf->iface, MAC2STR(sta->addr));
- sta->flags &= ~WLAN_STA_ASSOC;
+ sta->flags &= ~(WLAN_STA_ASSOC | WLAN_STA_ASSOC_REQ_OK);
ap_sta_set_authorized(hapd, sta, 0);
sta->timeout_next = STA_DEAUTH;
wpa_printf(MSG_DEBUG, "%s: reschedule ap_handle_timer timeout "
@@ -603,7 +603,7 @@ void ap_sta_deauthenticate(struct hostapd_data *hapd, struct sta_info *sta,
{
wpa_printf(MSG_DEBUG, "%s: deauthenticate STA " MACSTR,
hapd->conf->iface, MAC2STR(sta->addr));
- sta->flags &= ~(WLAN_STA_AUTH | WLAN_STA_ASSOC);
+ sta->flags &= ~(WLAN_STA_AUTH | WLAN_STA_ASSOC | WLAN_STA_ASSOC_REQ_OK);
ap_sta_set_authorized(hapd, sta, 0);
sta->timeout_next = STA_REMOVE;
wpa_printf(MSG_DEBUG, "%s: reschedule ap_handle_timer timeout "
@@ -923,7 +923,7 @@ void ap_sta_disconnect(struct hostapd_data *hapd, struct sta_info *sta,
ap_sta_set_authorized(hapd, sta, 0);
wpa_auth_sm_event(sta->wpa_sm, WPA_DEAUTH);
ieee802_1x_notify_port_enabled(sta->eapol_sm, 0);
- sta->flags &= ~(WLAN_STA_AUTH | WLAN_STA_ASSOC);
+ sta->flags &= ~(WLAN_STA_AUTH | WLAN_STA_ASSOC | WLAN_STA_ASSOC_REQ_OK);
wpa_printf(MSG_DEBUG, "%s: reschedule ap_handle_timer timeout "
"for " MACSTR " (%d seconds - "
"AP_MAX_INACTIVITY_AFTER_DEAUTH)",