[PATCH] AP MLD: set the link address only when the non-AP MLD is not added to the driver

Michael-CY Lee michael-cy.lee at mediatek.com
Wed Feb 14 23:36:41 PST 2024

Once the non-AP MLD is added to the driver, the driver handles the
address translation so that hostapd receives mgmt. with SA/DA being
translated into MLD addresses.

If the authentication request is re-transmitted with transaction being 1,
SA of the re-transmitted request is translated into MLD address by the
driver, and then in the function handle_auth(),
sta->mld_info.links[].peer_addr is replaced by the MLD address.

Therefore, only when the STA is not added into the driver that the link
address can be set.

Fixes: bcbe80a66 ("AP: MLO: Handle Multi-Link element during authentication")
Signed-off-by: Michael-CY Lee <michael-cy.lee at mediatek.com>
 src/ap/ieee802_11.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
index 7fb49a4b4..9b6a8d0fa 100644
--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
@@ -3077,7 +3077,7 @@ static void handle_auth(struct hostapd_data *hapd,
 #ifdef CONFIG_IEEE80211BE
-	if (auth_transaction == 1) {
+	if (!sta->added_unassoc) {
 		os_memset(&sta->mld_info, 0, sizeof(sta->mld_info));

More information about the Hostap mailing list