[RFC PATCH v1 01/13] FT: Add Multi-Link element to Authentication frames

Jeff Hansen x at jeffhansen.com
Fri Sep 11 12:20:00 PDT 2026


Include the Basic Multi-Link element in over-the-air FT Authentication
requests and allow hostapd to locate it in received FT Authentication
frames.

Signed-off-by: Jeff Hansen <x at jeffhansen.com>
---
 src/ap/ieee802_11_eht.c |  2 +-
 wpa_supplicant/sme.c    | 31 +++++++++++++++++++++++++++----
 2 files changed, 28 insertions(+), 5 deletions(-)

diff --git a/src/ap/ieee802_11_eht.c b/src/ap/ieee802_11_eht.c
index f484bbfa4..b36ce3531 100644
--- a/src/ap/ieee802_11_eht.c
+++ b/src/ap/ieee802_11_eht.c
@@ -1115,6 +1115,7 @@ static const u8 * auth_skip_fixed_fields(struct hostapd_data *hapd,
 	switch (auth_alg) {
 	case WLAN_AUTH_OPEN:
 	case WLAN_AUTH_EPPKE:
+	case WLAN_AUTH_FT:
 		return pos;
 #ifdef CONFIG_IEEE8021X_AUTH
 	case WLAN_AUTH_802_1X: {
@@ -1157,7 +1158,6 @@ static const u8 * auth_skip_fixed_fields(struct hostapd_data *hapd,
 		return pos;
 #endif /* CONFIG_SAE */
 	/* TODO: Support additional algorithms that can be used for MLO */
-	case WLAN_AUTH_FT:
 	case WLAN_AUTH_FILS_SK:
 	case WLAN_AUTH_FILS_SK_PFS:
 	case WLAN_AUTH_FILS_PK:
diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c
index 930360346..f4c649eed 100644
--- a/wpa_supplicant/sme.c
+++ b/wpa_supplicant/sme.c
@@ -52,6 +52,12 @@ static void sme_obss_scan_timeout(void *eloop_ctx, void *timeout_ctx);
 static void sme_stop_sa_query(struct wpa_supplicant *wpa_s);
 static int sme_validate_basic_mle(const struct ieee802_11_elems *elems,
 				  const u8 *addr);
+#if defined(CONFIG_SAE) || defined(CONFIG_IEEE8021X_AUTH) || \
+	(defined(CONFIG_IEEE80211R) && defined(CONFIG_IEEE80211BE))
+#define WPA_AUTH_FRAME_ML_IE_LEN	(6 + ETH_ALEN)
+static void wpa_auth_ml_ie(struct wpabuf *buf, const u8 *mld_addr);
+#endif /* CONFIG_SAE || CONFIG_IEEE8021X_AUTH ||
+	* (CONFIG_IEEE80211R && CONFIG_IEEE80211BE) */
 #ifdef CONFIG_IEEE8021X_AUTH
 static void sme_process_802_1x_auth_response(struct wpa_supplicant *wpa_s,
 					     struct auth_info *auth,
@@ -1856,6 +1862,23 @@ static void sme_send_authentication(struct wpa_supplicant *wpa_s,
 			params.auth_alg = WPA_AUTH_ALG_FT;
 			params.ie = wpa_s->sme.ft_ies;
 			params.ie_len = wpa_s->sme.ft_ies_len;
+#ifdef CONFIG_IEEE80211BE
+			if (params.mld) {
+				resp = wpabuf_alloc(params.ie_len +
+						   WPA_AUTH_FRAME_ML_IE_LEN);
+				if (!resp) {
+					wpa_msg(wpa_s, MSG_WARNING,
+						"SME: Failed to build MLO FT Authentication IEs");
+					os_free(wpa_ie);
+					wpas_connect_work_done(wpa_s);
+					return;
+				}
+				wpabuf_put_data(resp, params.ie, params.ie_len);
+				wpa_auth_ml_ie(resp, wpa_s->own_addr);
+				params.ie = wpabuf_head(resp);
+				params.ie_len = wpabuf_len(resp);
+			}
+#endif /* CONFIG_IEEE80211BE */
 		}
 	}
 #endif /* CONFIG_IEEE80211R */
@@ -2366,9 +2389,8 @@ void sme_authenticate(struct wpa_supplicant *wpa_s,
 }
 
 
-#if defined(CONFIG_SAE) || defined(CONFIG_IEEE8021X_AUTH)
-
-#define WPA_AUTH_FRAME_ML_IE_LEN	(6 + ETH_ALEN)
+#if defined(CONFIG_SAE) || defined(CONFIG_IEEE8021X_AUTH) || \
+	(defined(CONFIG_IEEE80211R) && defined(CONFIG_IEEE80211BE))
 
 static void wpa_auth_ml_ie(struct wpabuf *buf, const u8 *mld_addr)
 {
@@ -2386,7 +2408,8 @@ static void wpa_auth_ml_ie(struct wpabuf *buf, const u8 *mld_addr)
 	wpabuf_put_data(buf, mld_addr, ETH_ALEN);
 }
 
-#endif /* CONFIG_SAE || CONFIG_IEEE8021X_AUTH */
+#endif /* CONFIG_SAE || CONFIG_IEEE8021X_AUTH ||
+	* (CONFIG_IEEE80211R && CONFIG_IEEE80211BE) */
 
 
 #ifdef CONFIG_SAE
-- 
2.53.0




More information about the Hostap mailing list