]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Use separate flag for 4-way handshake offload
authorArend van Spriel <arend.vanspriel@broadcom.com>
Mon, 1 Jul 2019 22:13:49 +0000 (00:13 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 1 Aug 2019 12:52:48 +0000 (15:52 +0300)
Commit d896874f8689 ("nl80211: Indicate 802.1X 4-way handshake offload
in connect") used the req_key_mgmt_offload flag to indicate to the
driver that it should offload the 802.1X handshake. However, this field
was existing and used for a different offload API. This causes
wpa_supplicant to send a connect request without the WANT_1X_HS flag and
the subsequent set-pmk is rejected causing the connection to fail. Fix
that by introducing a new flag req_handshake_offload so the offloads are
no longer entangled.

Fixes: d896874f8689 ("nl80211: Indicate 802.1X 4-way handshake offload in connect")
Reported-by: Stefan Wahren <wahrenst@gmx.net>
Tested-by: Stefan Wahren <wahrenst@gmx.net>
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
src/drivers/driver.h
src/drivers/driver_nl80211.c
wpa_supplicant/wpa_supplicant.c

index 8a5cdb8e95a87d1dfc2affb7b394b6993949de05..2a8459ae3f2d7251193b9235be2c008ffadd4e81 100644 (file)
@@ -1073,6 +1073,14 @@ struct wpa_driver_associate_params {
         */
        int req_key_mgmt_offload;
 
+       /**
+        * req_handshake_offload - Request EAPOL handshake offload
+        *
+        * Request EAPOL handshake offload for this connection if the device
+        * supports it.
+        */
+       int req_handshake_offload;
+
        /**
         * Flag for indicating whether this association includes support for
         * RRM (Radio Resource Measurements)
index 7ed1878ad93b973afaa30c8d3b7b327ee668af48..0a356eefd58884b40cf2aeac989167dba8af9506 100644 (file)
@@ -5633,7 +5633,7 @@ static int nl80211_connect_common(struct wpa_driver_nl80211_data *drv,
                        return -1;
        }
 
-       if (params->req_key_mgmt_offload &&
+       if (params->req_handshake_offload &&
            (drv->capa.flags & WPA_DRIVER_FLAGS_4WAY_HANDSHAKE_8021X)) {
                    wpa_printf(MSG_DEBUG, "  * WANT_1X_4WAY_HS");
                    if (nla_put_flag(msg, NL80211_ATTR_WANT_1X_4WAY_HS))
index 78eef388dfa37d78e166929daed15e3c08a1978c..911d79d17495ac910d2e71f364125cd874a0401f 100644 (file)
@@ -3229,7 +3229,7 @@ static void wpas_start_assoc_cb(struct wpa_radio_work *work, int deinit)
             params.key_mgmt_suite == WPA_KEY_MGMT_IEEE8021X_SHA256 ||
             params.key_mgmt_suite == WPA_KEY_MGMT_IEEE8021X_SUITE_B ||
             params.key_mgmt_suite == WPA_KEY_MGMT_IEEE8021X_SUITE_B_192))
-               params.req_key_mgmt_offload = 1;
+               params.req_handshake_offload = 1;
 
        if (wpa_s->conf->key_mgmt_offload) {
                if (params.key_mgmt_suite == WPA_KEY_MGMT_IEEE8021X ||