[PATCH] nl80211: Fix AP MLD address on auth retry
Andrei Otcheretianski
andrei.otcheretianski at intel.com
Tue Dec 26 00:29:46 PST 2023
From: Johannes Berg <johannes.berg at intel.com>
The AP MLD address is meant to be preserved here, but since
it's reset to zeroes before attempting to authenticate in
nl80211_mark_disconnected(), we can't just point to the AP
MLD address in drv->auth_ap_mld_addr. Fix it by using a copy.
Signed-off-by: Johannes Berg <johannes.berg at intel.com>
---
src/drivers/driver_nl80211.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index a3bb2d5251..4673072911 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -4090,6 +4090,7 @@ int wpa_driver_nl80211_authenticate_retry(struct wpa_driver_nl80211_data *drv)
{
struct wpa_driver_auth_params params;
struct i802_bss *bss = drv->first_bss;
+ u8 ap_mld_addr[ETH_ALEN];
int i;
wpa_printf(MSG_DEBUG, "nl80211: Try to authenticate again");
@@ -4115,8 +4116,10 @@ int wpa_driver_nl80211_authenticate_retry(struct wpa_driver_nl80211_data *drv)
params.auth_data_len = drv->auth_data_len;
params.mld = drv->auth_mld;
params.mld_link_id = drv->auth_mld_link_id;
- if (drv->auth_mld)
- params.ap_mld_addr = drv->auth_ap_mld_addr;
+ if (drv->auth_mld) {
+ os_memcpy(ap_mld_addr, drv->auth_ap_mld_addr, ETH_ALEN);
+ params.ap_mld_addr = ap_mld_addr;
+ }
for (i = 0; i < 4; i++) {
if (drv->auth_wep_key_len[i]) {
--
2.43.0
More information about the Hostap
mailing list