void wpa_auth_ml_get_key_info(struct wpa_authenticator *a,
struct wpa_auth_ml_link_key_info *info,
- bool mgmt_frame_prot, bool beacon_prot)
+ bool mgmt_frame_prot, bool beacon_prot,
+ bool rekey)
{
struct wpa_group *gsm = a->group;
u8 rsc[WPA_KEY_RSC_LEN];
info->gtk = gsm->GTK[gsm->GN - 1];
info->gtk_len = gsm->GTK_len;
- if (wpa_auth_get_seqnum(a, NULL, gsm->GN, rsc) < 0)
+ if (rekey || wpa_auth_get_seqnum(a, NULL, gsm->GN, rsc) < 0)
os_memset(info->pn, 0, sizeof(info->pn));
else
os_memcpy(info->pn, rsc, sizeof(info->pn));
info->igtk = gsm->IGTK[gsm->GN_igtk - 4];
info->igtk_len = wpa_cipher_key_len(a->conf.group_mgmt_cipher);
- if (wpa_auth_get_seqnum(a, NULL, gsm->GN_igtk, rsc) < 0)
+ if (rekey || wpa_auth_get_seqnum(a, NULL, gsm->GN_igtk, rsc) < 0)
os_memset(info->ipn, 0, sizeof(info->ipn));
else
os_memcpy(info->ipn, rsc, sizeof(info->ipn));
info->bigtkidx = gsm->GN_bigtk;
info->bigtk = gsm->BIGTK[gsm->GN_bigtk - 6];
- if (wpa_auth_get_seqnum(a, NULL, gsm->GN_bigtk, rsc) < 0)
+ if (rekey || wpa_auth_get_seqnum(a, NULL, gsm->GN_bigtk, rsc) < 0)
os_memset(info->bipn, 0, sizeof(info->bipn));
else
os_memcpy(info->bipn, rsc, sizeof(info->bipn));
static void wpa_auth_get_ml_key_info(struct wpa_authenticator *wpa_auth,
- struct wpa_auth_ml_key_info *info)
+ struct wpa_auth_ml_key_info *info,
+ bool rekey)
{
if (!wpa_auth->cb->get_ml_key_info)
return;
- wpa_auth->cb->get_ml_key_info(wpa_auth->cb_ctx, info);
+ wpa_auth->cb->get_ml_key_info(wpa_auth->cb_ctx, info, rekey);
}
struct wpa_auth_ml_key_info ml_key_info;
unsigned int i, link_id;
u8 *start = pos;
+ bool rekey = sm->wpa_ptk_group_state == WPA_PTK_GROUP_REKEYNEGOTIATING;
/* First fetch the key information from all the authenticators */
os_memset(&ml_key_info, 0, sizeof(ml_key_info));
ml_key_info.links[i++].link_id = link_id;
}
- wpa_auth_get_ml_key_info(sm->wpa_auth, &ml_key_info);
+ wpa_auth_get_ml_key_info(sm->wpa_auth, &ml_key_info, rekey);
/* Add MLO GTK KDEs */
for (i = 0, link_id = 0; link_id < MAX_NUM_MLD_LINKS; link_id++) {
size_t ltf_keyseed_len);
#endif /* CONFIG_PASN */
#ifdef CONFIG_IEEE80211BE
- int (*get_ml_key_info)(void *ctx, struct wpa_auth_ml_key_info *info);
+ int (*get_ml_key_info)(void *ctx, struct wpa_auth_ml_key_info *info,
+ bool rekey);
#endif /* CONFIG_IEEE80211BE */
int (*get_drv_flags)(void *ctx, u64 *drv_flags, u64 *drv_flags2);
};
u8 mld_assoc_link_id, struct mld_info *info);
void wpa_auth_ml_get_key_info(struct wpa_authenticator *a,
struct wpa_auth_ml_link_key_info *info,
- bool mgmt_frame_prot, bool beacon_prot);
+ bool mgmt_frame_prot, bool beacon_prot,
+ bool rekey);
void wpa_release_link_auth_ref(struct wpa_state_machine *sm,
int release_link_id);