From: Allen Ye Date: Wed, 14 Jan 2026 09:20:07 +0000 (+0800) Subject: AP MLD: Handle group init on first STA association on all links X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1b9a365522ee0123dfe9cc274ad5c8e718fc6b15;p=thirdparty%2Fhostap.git AP MLD: Handle group init on first STA association on all links 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 Signed-off-by: Allen Ye --- diff --git a/src/ap/wpa_auth.c b/src/ap/wpa_auth.c index 75c265a5b..eb3f9bb24 100644 --- a/src/ap/wpa_auth.c +++ b/src/ap/wpa_auth.c @@ -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; /*