]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
OWE: Update connect params with new DH attributes to the driver
authorSunil Dutt <usdutt@codeaurora.org>
Thu, 25 Jul 2019 06:40:57 +0000 (12:10 +0530)
committerJouni Malinen <j@w1.fi>
Fri, 16 Aug 2019 12:31:10 +0000 (15:31 +0300)
A new DH public key is sent through this interface to the driver after
every successful connection/roam to a BSS. This helps to do OWE roaming
to a new BSS with drivers that implement SME/MLME operations during
roaming.

This updated DH IEs are added in the subsequent (Re)Association Request
frame sent by the station when roaming. The DH IE from the roamed AP is
given to wpa_supplicant in the roam result event. wpa_supplicant shall
further process these DH IEs to generate the PMK for the 4-way
handshake.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
wpa_supplicant/wpa_supplicant.c

index d536be0a6d17710b4de5752867158ac18ef1e8b7..e7a24fc9ce39ab934ebb9b69b75a317f9f71a5b3 100644 (file)
@@ -125,6 +125,9 @@ static void wpa_bss_tmp_disallow_timeout(void *eloop_ctx, void *timeout_ctx);
 #if defined(CONFIG_FILS) && defined(IEEE8021X_EAPOL)
 static void wpas_update_fils_connect_params(struct wpa_supplicant *wpa_s);
 #endif /* CONFIG_FILS && IEEE8021X_EAPOL */
+#ifdef CONFIG_OWE
+static void wpas_update_owe_connect_params(struct wpa_supplicant *wpa_s);
+#endif /* CONFIG_OWE */
 
 
 /* Configure default/group WEP keys for static WEP */
@@ -944,6 +947,10 @@ void wpa_supplicant_set_state(struct wpa_supplicant *wpa_s,
                if (!fils_hlp_sent && ssid && ssid->eap.erp)
                        wpas_update_fils_connect_params(wpa_s);
 #endif /* CONFIG_FILS && IEEE8021X_EAPOL */
+#ifdef CONFIG_OWE
+               if (ssid && (ssid->key_mgmt & WPA_KEY_MGMT_OWE))
+                       wpas_update_owe_connect_params(wpa_s);
+#endif /* CONFIG_OWE */
        } else if (state == WPA_DISCONNECTED || state == WPA_ASSOCIATING ||
                   state == WPA_ASSOCIATED) {
                wpa_s->new_connection = 1;
@@ -2964,6 +2971,24 @@ pfs_fail:
 }
 
 
+#ifdef CONFIG_OWE
+static void wpas_update_owe_connect_params(struct wpa_supplicant *wpa_s)
+{
+       struct wpa_driver_associate_params params;
+       u8 *wpa_ie;
+
+       os_memset(&params, 0, sizeof(params));
+       wpa_ie = wpas_populate_assoc_ies(wpa_s, wpa_s->current_bss,
+                                        wpa_s->current_ssid, &params, NULL);
+       if (!wpa_ie)
+               return;
+
+       wpa_drv_update_connect_params(wpa_s, &params, WPA_DRV_UPDATE_ASSOC_IES);
+       os_free(wpa_ie);
+}
+#endif /* CONFIG_OWE */
+
+
 #if defined(CONFIG_FILS) && defined(IEEE8021X_EAPOL)
 static void wpas_update_fils_connect_params(struct wpa_supplicant *wpa_s)
 {