aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAshok Kumar <aponnaia@codeaurora.org>2018-11-01 11:03:21 (GMT)
committerJouni Malinen <j@w1.fi>2018-12-02 18:42:09 (GMT)
commit698c9e202118f88537356e3ada943327082dfea3 (patch)
tree1c3623b776f6bf4370b8a478b4a6aafba8c707cd
parent8fc6d884654ccd2fffa77e4cabb1f9d2ab37c13e (diff)
downloadhostap-698c9e202118f88537356e3ada943327082dfea3.zip
hostap-698c9e202118f88537356e3ada943327082dfea3.tar.gz
hostap-698c9e202118f88537356e3ada943327082dfea3.tar.bz2
OWE: Try another group only on association rejection with status 77
Do not change the OWE group if association is rejected for any other reason than WLAN_STATUS_FINITE_CYCLIC_GROUP_NOT_SUPPORTED to avoid unnecessary latency in cases where the APs reject association, e.g., for load balancing reasons. Signed-off-by: Ashok Kumar <aponnaia@codeaurora.org>
-rw-r--r--wpa_supplicant/events.c1
-rw-r--r--wpa_supplicant/sme.c6
-rw-r--r--wpa_supplicant/wpa_supplicant.c6
3 files changed, 11 insertions, 2 deletions
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index 846bf00..37d429d 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -4085,6 +4085,7 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
}
#endif /* CONFIG_TESTING_OPTIONS */
wpa_supplicant_event_assoc(wpa_s, data);
+ wpa_s->assoc_status_code = WLAN_STATUS_SUCCESS;
if (data &&
(data->assoc_info.authorized ||
(!(wpa_s->drv_flags & WPA_DRIVER_FLAGS_SME) &&
diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c
index dd42a19..39c8069 100644
--- a/wpa_supplicant/sme.c
+++ b/wpa_supplicant/sme.c
@@ -1520,14 +1520,18 @@ void sme_associate(struct wpa_supplicant *wpa_s, enum wpas_mode mode,
if (wpa_s->current_ssid && wpa_s->current_ssid->owe_group) {
group = wpa_s->current_ssid->owe_group;
- } else {
+ } else if (wpa_s->assoc_status_code ==
+ WLAN_STATUS_FINITE_CYCLIC_GROUP_NOT_SUPPORTED) {
if (wpa_s->last_owe_group == 19)
group = 20;
else if (wpa_s->last_owe_group == 20)
group = 21;
else
group = OWE_DH_GROUP;
+ } else {
+ group = OWE_DH_GROUP;
}
+
wpa_s->last_owe_group = group;
wpa_printf(MSG_DEBUG, "OWE: Try to use group %u", group);
owe_ie = owe_build_assoc_req(wpa_s->wpa, group);
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index 0fe2adb..a4b2867 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -2754,14 +2754,18 @@ static u8 * wpas_populate_assoc_ies(
if (ssid->owe_group) {
group = ssid->owe_group;
- } else {
+ } else if (wpa_s->assoc_status_code ==
+ WLAN_STATUS_FINITE_CYCLIC_GROUP_NOT_SUPPORTED) {
if (wpa_s->last_owe_group == 19)
group = 20;
else if (wpa_s->last_owe_group == 20)
group = 21;
else
group = OWE_DH_GROUP;
+ } else {
+ group = OWE_DH_GROUP;
}
+
wpa_s->last_owe_group = group;
wpa_printf(MSG_DEBUG, "OWE: Try to use group %u", group);
owe_ie = owe_build_assoc_req(wpa_s->wpa, group);