]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
SME: Do not send RSNXE for WPA 1 connections
authorBenjamin Berg <benjamin.berg@intel.com>
Thu, 18 Dec 2025 16:19:33 +0000 (17:19 +0100)
committerJouni Malinen <j@w1.fi>
Sat, 24 Jan 2026 17:48:43 +0000 (19:48 +0200)
The element is not applicable to WPA 1 and it will not be included in
the KDE later on. However, hostapd checks that the KDE and the
association request match and deauthenticates the station if it sent the
RSNXE in the association request.

So omit sending it if the protocol is WPA_PROTO_WPA.

Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
wpa_supplicant/sme.c

index a1a7b1710b3e55035f10940d530e9b595e30b07a..a3ad0735339248dd27b676d4b53e71e2e707e190 100644 (file)
@@ -810,6 +810,7 @@ static void sme_send_authentication(struct wpa_supplicant *wpa_s,
        if (wpa_s->wpa_proto == WPA_PROTO_WPA) {
                wpa_ie = os_memdup(wpa_s->sme.assoc_req_ie,
                                   wpa_s->sme.assoc_req_ie_len);
+               omit_rsnxe = 1;
                if (wpa_ie) {
                        wpa_dbg(wpa_s, MSG_DEBUG, "WPA: Storing WPA IE");
 
@@ -858,8 +859,8 @@ static void sme_send_authentication(struct wpa_supplicant *wpa_s,
                    wpa_sm_has_ft_keys(wpa_s->wpa, md)) {
                        wpa_dbg(wpa_s, MSG_DEBUG, "SME: Trying to use FT "
                                "over-the-air");
-                       omit_rsnxe = !wpa_bss_get_rsnxe(wpa_s, bss, ssid,
-                                                       false);
+                       omit_rsnxe |= !wpa_bss_get_rsnxe(wpa_s, bss, ssid,
+                                                        false);
                        params.auth_alg = WPA_AUTH_ALG_FT;
                        params.ie = wpa_s->sme.ft_ies;
                        params.ie_len = wpa_s->sme.ft_ies_len;