]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
AP MLD: Handle group init on first STA association on all links
authorAllen Ye <allen.ye@mediatek.com>
Wed, 14 Jan 2026 09:20:07 +0000 (17:20 +0800)
committerJouni Malinen <j@w1.fi>
Sat, 24 Jan 2026 17:09:26 +0000 (19:09 +0200)
Currently, only the association link sets the first_sta_seen flag in an
ML association. That allows the GTK of the other links to be reset if
another station associates with the other links.

Initialize the GTK and set the first_sta_seen flag for all links in an
ML association to avoid this.

Reviewed-by: Money Wang <money.wang@mediatek.com>
Signed-off-by: Allen Ye <allen.ye@mediatek.com>
src/ap/wpa_auth.c

index 75c265a5b4e7f2bc7d6449ec3af3d7ed9ff6e34b..eb3f9bb2444fe2609118b09aadb1b64e9fb0e388 100644 (file)
@@ -2677,9 +2677,18 @@ static void wpa_group_ensure_init(struct wpa_authenticator *wpa_auth,
 
 SM_STATE(WPA_PTK, AUTHENTICATION2)
 {
+#ifdef CONFIG_IEEE80211BE
+       int link_id;
+#endif /* CONFIG_IEEE80211BE */
+
        SM_ENTRY_MA(WPA_PTK, AUTHENTICATION2, wpa_ptk);
 
        wpa_group_ensure_init(sm->wpa_auth, sm->group);
+#ifdef CONFIG_IEEE80211BE
+       for_each_sm_auth(sm, link_id)
+               wpa_group_ensure_init(sm->mld_links[link_id].wpa_auth,
+                                     sm->mld_links[link_id].wpa_auth->group);
+#endif /* CONFIG_IEEE80211BE */
        sm->ReAuthenticationRequest = false;
 
        /*