]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
AP: Use the MLD MAC address for SAE authentication failures and testing
authorIlan Peer <ilan.peer@intel.com>
Thu, 21 Dec 2023 11:38:06 +0000 (13:38 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 22 Dec 2023 14:47:48 +0000 (16:47 +0200)
In cases of SAE failure and testing, mgmt->sa was used for sending the
Authentication frame. Fix these to use the station address (which is
the MLD MAC address in cases of non-AP MLDs).

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
src/ap/ieee802_11.c

index 6047e7122de8faf2380feb7b4106cc7e05bac11a..c905c0fcd0fdd214c7dcae351374e8311a4dd743 100644 (file)
@@ -1282,7 +1282,8 @@ static void handle_auth_sae(struct hostapd_data *hapd, struct sta_info *sta,
                pos = mgmt->u.auth.variable;
                end = ((const u8 *) mgmt) + len;
                resp = status_code;
-               send_auth_reply(hapd, sta, mgmt->sa, mgmt->bssid, WLAN_AUTH_SAE,
+               send_auth_reply(hapd, sta, sta->addr, mgmt->bssid,
+                               WLAN_AUTH_SAE,
                                auth_transaction, resp, pos, end - pos,
                                "auth-sae-reflection-attack");
                goto remove_sta;
@@ -1290,7 +1291,8 @@ static void handle_auth_sae(struct hostapd_data *hapd, struct sta_info *sta,
 
        if (hapd->conf->sae_commit_override && auth_transaction == 1) {
                wpa_printf(MSG_DEBUG, "SAE: TESTING - commit override");
-               send_auth_reply(hapd, sta, mgmt->sa, mgmt->bssid, WLAN_AUTH_SAE,
+               send_auth_reply(hapd, sta, sta->addr, mgmt->bssid,
+                               WLAN_AUTH_SAE,
                                auth_transaction, resp,
                                wpabuf_head(hapd->conf->sae_commit_override),
                                wpabuf_len(hapd->conf->sae_commit_override),
@@ -1561,7 +1563,8 @@ reply:
                        data = wpabuf_alloc_copy(pos, 2);
 
                sae_sme_send_external_auth_status(hapd, sta, resp);
-               send_auth_reply(hapd, sta, mgmt->sa, mgmt->bssid, WLAN_AUTH_SAE,
+               send_auth_reply(hapd, sta, sta->addr, mgmt->bssid,
+                               WLAN_AUTH_SAE,
                                auth_transaction, resp,
                                data ? wpabuf_head(data) : (u8 *) "",
                                data ? wpabuf_len(data) : 0, "auth-sae");