aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/sme.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2017-12-27 19:06:02 (GMT)
committerJouni Malinen <j@w1.fi>2017-12-27 19:06:02 (GMT)
commit2cb40e9f402c82815ea1f685ceb9816106fda445 (patch)
tree5332c1011177498b343c70c1dc0e73710e257bda /wpa_supplicant/sme.c
parentcc15799f6d9515070e949b906d5af9ad097719b4 (diff)
downloadhostap-2cb40e9f402c82815ea1f685ceb9816106fda445.zip
hostap-2cb40e9f402c82815ea1f685ceb9816106fda445.tar.gz
hostap-2cb40e9f402c82815ea1f685ceb9816106fda445.tar.bz2
OWE: Try all supported DH groups automatically on STA
If a specific DH group for OWE is not set with the owe_group parameter, try all supported DH groups (currently 19, 20, 21) one by one if the AP keeps rejecting groups with the status code 77. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant/sme.c')
-rw-r--r--wpa_supplicant/sme.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c
index da0e8eb..723a779 100644
--- a/wpa_supplicant/sme.c
+++ b/wpa_supplicant/sme.c
@@ -1204,10 +1204,20 @@ void sme_associate(struct wpa_supplicant *wpa_s, enum wpas_mode mode,
if (auth_type == WLAN_AUTH_OPEN &&
wpa_s->key_mgmt == WPA_KEY_MGMT_OWE) {
struct wpabuf *owe_ie;
- u16 group = OWE_DH_GROUP;
+ u16 group;
- if (wpa_s->current_ssid && wpa_s->current_ssid->owe_group)
+ if (wpa_s->current_ssid && wpa_s->current_ssid->owe_group) {
group = wpa_s->current_ssid->owe_group;
+ } else {
+ if (wpa_s->last_owe_group == 19)
+ group = 20;
+ else if (wpa_s->last_owe_group == 20)
+ group = 21;
+ 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);
if (!owe_ie) {
wpa_printf(MSG_ERROR,