aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/events.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2015-10-25 13:12:58 (GMT)
committerJouni Malinen <j@w1.fi>2015-10-25 17:37:17 (GMT)
commitfa4642672542e9390aff3247ef63e51ec6ae0663 (patch)
treee5f9b26b0b6fb032b3685c25ae24a991b9a604f4 /wpa_supplicant/events.c
parent8acbe7f2a46cb2fb8cadd89c76fa98b037306342 (diff)
downloadhostap-fa4642672542e9390aff3247ef63e51ec6ae0663.zip
hostap-fa4642672542e9390aff3247ef63e51ec6ae0663.tar.gz
hostap-fa4642672542e9390aff3247ef63e51ec6ae0663.tar.bz2
RSN: Do not try to connect if PMF disabled and AP requires it
Instead of trying to associate in configuration that is known to result in the AP rejecting the association, reject the BSS candidate based on the MFPR=1 RSN capability when STA configuration has PMF disabled. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant/events.c')
-rw-r--r--wpa_supplicant/events.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index ea1f142..aab752c 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -564,6 +564,13 @@ static int wpa_supplicant_ssid_bss_match(struct wpa_supplicant *wpa_s,
break;
}
#endif /* CONFIG_IEEE80211W */
+ if ((ie.capabilities & WPA_CAPABILITY_MFPR) &&
+ wpas_get_ssid_pmf(wpa_s, ssid) ==
+ NO_MGMT_FRAME_PROTECTION) {
+ wpa_dbg(wpa_s, MSG_DEBUG,
+ " skip RSN IE - no mgmt frame protection enabled but AP requires it");
+ break;
+ }
wpa_dbg(wpa_s, MSG_DEBUG, " selected based on RSN IE");
return 1;