]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
AP: Specify the link ID for set_key() callback for group keys
authorIlan Peer <ilan.peer@intel.com>
Mon, 22 May 2023 19:34:06 +0000 (22:34 +0300)
committerJouni Malinen <j@w1.fi>
Thu, 15 Jun 2023 14:34:02 +0000 (17:34 +0300)
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>
src/ap/ap_drv_ops.c

index 38c83c7e88eaa9721f5ab1370d5c77fa94a63435..6864ed4020ae4ee05649821ce45318dbd0d34051 100644 (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);
 }