aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2016-12-11 16:23:13 (GMT)
committerJouni Malinen <j@w1.fi>2016-12-11 16:23:13 (GMT)
commita1836de64b379ea6eb1a50498a803571a74181f6 (patch)
tree6d4b483cf729a22b96fe12b088421629b317ab3a /wpa_supplicant
parentf49c852b5e387ce137bcf16c9388130ac3bee58e (diff)
downloadhostap-a1836de64b379ea6eb1a50498a803571a74181f6.zip
hostap-a1836de64b379ea6eb1a50498a803571a74181f6.tar.gz
hostap-a1836de64b379ea6eb1a50498a803571a74181f6.tar.bz2
SME: Fix IBSS setup after shared key/FT/FILS association
wpa_s->sme.auth_alg could have been left to a previously value other than WPA_AUTH_ALG_OPEN if IBSS network is used after an association that used shared key, FT, or FILS authentication algorithm. This could result in the IBSS setup failing due to incorrect authentication processing steps. Fix this by setting wpa_s->sme.auth_alg = WPA_AUTH_ALG_OPEN whenever starting an IBSS (or mesh, for that matter) network. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant')
-rw-r--r--wpa_supplicant/wpa_supplicant.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index 0bfc39d..330b52e 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -1798,6 +1798,13 @@ void wpa_supplicant_associate(struct wpa_supplicant *wpa_s,
return;
}
+#ifdef CONFIG_SME
+ if (ssid->mode == WPAS_MODE_IBSS || ssid->mode == WPAS_MODE_MESH) {
+ /* Clear possibly set auth_alg, if any, from last attempt. */
+ wpa_s->sme.auth_alg = WPA_AUTH_ALG_OPEN;
+ }
+#endif /* CONFIG_SME */
+
wpas_abort_ongoing_scan(wpa_s);
cwork = os_zalloc(sizeof(*cwork));