aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2017-10-09 09:35:14 (GMT)
committerJouni Malinen <j@w1.fi>2017-10-09 09:35:14 (GMT)
commit109704657da1b41ab2132e62731643ed745d8f69 (patch)
tree8714db88f3e1fc8c3b918b823858dc6b6881bdaf /wpa_supplicant
parent26b96d050d6cfb80704e66c993766c99389c4baa (diff)
downloadhostap-109704657da1b41ab2132e62731643ed745d8f69.zip
hostap-109704657da1b41ab2132e62731643ed745d8f69.tar.gz
hostap-109704657da1b41ab2132e62731643ed745d8f69.tar.bz2
OWE: Support station SME-in-driver case
Previously, only the SME-in-wpa_supplicant case was supported. This extends that to cover the drivers that implement SME internally (e.g., through the cfg80211 Connect command). Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant')
-rw-r--r--wpa_supplicant/wpa_supplicant.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index e463709..a3face2 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -2320,7 +2320,7 @@ static void wpas_start_assoc_cb(struct wpa_radio_work *work, int deinit)
struct wpa_ssid *ssid = cwork->ssid;
struct wpa_supplicant *wpa_s = work->wpa_s;
u8 *wpa_ie;
- size_t max_wpa_ie_len = 200;
+ size_t max_wpa_ie_len = 500;
size_t wpa_ie_len;
int use_crypt, ret, i, bssid_changed;
int algs = WPA_AUTH_ALG_OPEN;
@@ -2684,6 +2684,25 @@ static void wpas_start_assoc_cb(struct wpa_radio_work *work, int deinit)
}
#endif /* CONFIG_FILS */
+#ifdef CONFIG_OWE
+ if (algs == WPA_AUTH_ALG_OPEN &&
+ ssid->key_mgmt == WPA_KEY_MGMT_OWE) {
+ struct wpabuf *owe_ie;
+ u16 group = OWE_DH_GROUP;
+
+ if (ssid->owe_group)
+ group = ssid->owe_group;
+ owe_ie = owe_build_assoc_req(wpa_s->wpa, group);
+ if (owe_ie &&
+ wpabuf_len(owe_ie) <= max_wpa_ie_len - wpa_ie_len) {
+ os_memcpy(wpa_ie + wpa_ie_len,
+ wpabuf_head(owe_ie), wpabuf_len(owe_ie));
+ wpa_ie_len += wpabuf_len(owe_ie);
+ wpabuf_free(owe_ie);
+ }
+ }
+#endif /* CONFIG_OWE */
+
wpa_clear_keys(wpa_s, bss ? bss->bssid : NULL);
use_crypt = 1;
cipher_pairwise = wpa_s->pairwise_cipher;