From: Ilan Peer <ilan.peer@xxxxxxxxx> Do include group MLO KDEs for links for which the information is missing. In addition, set the KDE buffer length based on the added data. Signed-off-by: Ilan Peer <ilan.peer@xxxxxxxxx> --- src/ap/wpa_auth.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/ap/wpa_auth.c b/src/ap/wpa_auth.c index 2057cf393d..15a50b1f90 100644 --- a/src/ap/wpa_auth.c +++ b/src/ap/wpa_auth.c @@ -3856,7 +3856,8 @@ static u8 * wpa_auth_ml_group_kdes(struct wpa_state_machine *sm, u8 *pos) /* Add MLO GTK KDEs */ for (i = 0, link_id = 0; link_id < MAX_NUM_MLD_LINKS; link_id++) { - if (!sm->mld_links[link_id].valid) + if (!sm->mld_links[link_id].valid || + !ml_key_info.links[i].gtk_len) continue; wpa_printf(MSG_DEBUG, "RSN: MLO GTK: link=%u", link_id); @@ -3888,7 +3889,8 @@ static u8 * wpa_auth_ml_group_kdes(struct wpa_state_machine *sm, u8 *pos) /* Add MLO IGTK KDEs */ for (i = 0, link_id = 0; link_id < MAX_NUM_MLD_LINKS; link_id++) { - if (!sm->mld_links[link_id].valid) + if (!sm->mld_links[link_id].valid || + !ml_key_info.links[i].igtk_len) continue; wpa_printf(MSG_DEBUG, "RSN: MLO IGTK: link=%u", link_id); @@ -3927,7 +3929,8 @@ static u8 * wpa_auth_ml_group_kdes(struct wpa_state_machine *sm, u8 *pos) /* Add MLO BIGTK KDEs */ for (i = 0, link_id = 0; link_id < MAX_NUM_MLD_LINKS; link_id++) { - if (!sm->mld_links[link_id].valid) + if (!sm->mld_links[link_id].valid || + !ml_key_info.links[i].igtk_len) continue; wpa_printf(MSG_DEBUG, "RSN: MLO BIGTK: link=%u", link_id); @@ -4723,7 +4726,8 @@ SM_STATE(WPA_PTK_GROUP, REKEYNEGOTIATING) return; kde = pos = kde_buf; - wpa_auth_ml_group_kdes(sm, pos); + pos = wpa_auth_ml_group_kdes(sm, pos); + kde_len = pos - kde_buf; } #endif /* CONFIG_IEEE80211BE */ } else { -- 2.38.1 _______________________________________________ Hostap mailing list Hostap@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/hostap