aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd/hostapd.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2008-11-30 15:22:51 (GMT)
committerJouni Malinen <j@w1.fi>2008-11-30 15:22:51 (GMT)
commita8d05fca5f14fc3b89cc408a58c47fad7470364e (patch)
tree7453dcec48deb3db75a27312a73dd4113a964449 /hostapd/hostapd.c
parent0a40ec6a9059e7893970ff65554beac4782ecec4 (diff)
downloadhostap-06-a8d05fca5f14fc3b89cc408a58c47fad7470364e.zip
hostap-06-a8d05fca5f14fc3b89cc408a58c47fad7470364e.tar.gz
hostap-06-a8d05fca5f14fc3b89cc408a58c47fad7470364e.tar.bz2
Clear various flags on re-association to allow key_mgmt changes
If a STA reassociates and changes key_mgmt (e.g., from WPA-PSK to WPS), hostapd needs to reset some of the existing STA and WPA state machine variables to allow correct processing for the new association.
Diffstat (limited to 'hostapd/hostapd.c')
-rw-r--r--hostapd/hostapd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hostapd/hostapd.c b/hostapd/hostapd.c
index 6efe13f..225ad3a 100644
--- a/hostapd/hostapd.c
+++ b/hostapd/hostapd.c
@@ -254,7 +254,8 @@ void hostapd_new_assoc_sta(struct hostapd_data *hapd, struct sta_info *sta,
/* Start IEEE 802.1X authentication process for new stations */
ieee802_1x_new_station(hapd, sta);
if (reassoc) {
- if (sta->auth_alg != WLAN_AUTH_FT)
+ if (sta->auth_alg != WLAN_AUTH_FT &&
+ !(sta->flags & (WLAN_STA_WPS | WLAN_STA_MAYBE_WPS)))
wpa_auth_sm_event(sta->wpa_sm, WPA_REAUTH);
} else
wpa_auth_sta_associated(hapd->wpa_auth, sta->wpa_sm);