AP: Specify the link ID for set_key() callback for group keys

If the AP is part of an AP MLD specify the link ID in the set_key
parameters whenever setting a group key.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
This commit is contained in:
Ilan Peer 2023-05-22 22:34:06 +03:00 committed by Jouni Malinen
parent 8a8752876a
commit 8b49853f49

View file

@ -760,6 +760,11 @@ int hostapd_drv_set_key(const char *ifname, struct hostapd_data *hapd,
params.key_flag = key_flag;
params.link_id = -1;
#ifdef CONFIG_IEEE80211BE
if (hapd->conf->mld_ap && !(key_flag & KEY_FLAG_PAIRWISE))
params.link_id = hapd->mld_link_id;
#endif /* CONFIG_IEEE80211BE */
return hapd->driver->set_key(hapd->drv_priv, &params);
}