[PATCH 2/6] hostapd: Handle no_sta flag in auth

Ramasamy Kaliappan ramasamy.kaliappan at oss.qualcomm.com
Thu Aug 6 09:31:43 PDT 2026


Use the driver-provided no_sta indication on received authentication
frames to determine the correct reply address and whether replies
should be sent to the MLD address or to the source address.

The no_sta flag is set when the kernel has no station entry for the
received frame or when a frame should be transmitted without using a
known station entry.

When handling authentication frames, this flag is used to determine
whether MLD address translation was applied and to ensure that responses
are sent to the corresponding MLD address. Otherwise,
the response is sent to the source address of the received frame.

Signed-off-by: Ramasamy Kaliappan <ramasamy.kaliappan at oss.qualcomm.com>
---
 src/ap/ap_drv_ops.c          | 22 +++++++++-
 src/ap/ap_drv_ops.h          |  4 ++
 src/ap/hostapd.h             |  1 +
 src/ap/ieee802_11.c          | 79 ++++++++++++++++++++----------------
 src/ap/sta_info.h            |  4 ++
 src/drivers/driver.h         |  4 +-
 src/drivers/driver_nl80211.c | 33 ++++++++-------
 wpa_supplicant/driver_i.h    |  2 +-
 wpa_supplicant/mesh_mpm.c    |  1 +
 9 files changed, 99 insertions(+), 51 deletions(-)

diff --git a/src/ap/ap_drv_ops.c b/src/ap/ap_drv_ops.c
index 19a264ce7867..83a7573cc55f 100644
--- a/src/ap/ap_drv_ops.c
+++ b/src/ap/ap_drv_ops.c
@@ -889,6 +889,26 @@ int hostapd_drv_set_key(const char *ifname, struct hostapd_data *hapd,
 }
 
 
+int hostapd_drv_send_mgmt_resp(struct hostapd_data *hapd,
+			  const void *msg, size_t len, int noack,
+			  const u16 *csa_offs, size_t csa_offs_len,
+			  int no_encrypt, bool drv_no_sta)
+{
+	int link_id = -1;
+
+#ifdef CONFIG_IEEE80211BE
+	if (hapd->conf->mld_ap)
+		link_id = hapd->mld_link_id;
+#endif /* CONFIG_IEEE80211BE */
+
+	if (!hapd->driver || !hapd->driver->send_mlme || !hapd->drv_priv)
+		return 0;
+	return hapd->driver->send_mlme(hapd->drv_priv, msg, len, noack, 0,
+				       csa_offs, csa_offs_len, no_encrypt, 0,
+				       link_id, drv_no_sta);
+}
+
+
 int hostapd_drv_send_mlme(struct hostapd_data *hapd,
 			  const void *msg, size_t len, int noack,
 			  const u16 *csa_offs, size_t csa_offs_len,
@@ -905,7 +925,7 @@ int hostapd_drv_send_mlme(struct hostapd_data *hapd,
 		return 0;
 	return hapd->driver->send_mlme(hapd->drv_priv, msg, len, noack, 0,
 				       csa_offs, csa_offs_len, no_encrypt, 0,
-				       link_id);
+				       link_id, false);
 }
 
 
diff --git a/src/ap/ap_drv_ops.h b/src/ap/ap_drv_ops.h
index f09b3ad9a306..5684ed9e4b18 100644
--- a/src/ap/ap_drv_ops.h
+++ b/src/ap/ap_drv_ops.h
@@ -103,6 +103,10 @@ int hostapd_drv_set_key(const char *ifname,
 			int key_idx, int vlan_id, int set_tx,
 			const u8 *seq, size_t seq_len,
 			const u8 *key, size_t key_len, enum key_flag key_flag);
+int hostapd_drv_send_mgmt_resp(struct hostapd_data *hapd,
+			       const void *msg, size_t len, int noack,
+			       const u16 *csa_offs, size_t csa_offs_len,
+			       int no_encrypt, bool drv_no_sta);
 int hostapd_drv_send_mlme(struct hostapd_data *hapd,
 			  const void *msg, size_t len, int noack,
 			  const u16 *csa_offs, size_t csa_offs_len,
diff --git a/src/ap/hostapd.h b/src/ap/hostapd.h
index a0f569e8417e..736a58028fe1 100644
--- a/src/ap/hostapd.h
+++ b/src/ap/hostapd.h
@@ -171,6 +171,7 @@ struct hostapd_neighbor_entry {
 struct hostapd_sae_commit_queue {
 	struct dl_list list;
 	int rssi;
+	bool no_sta;
 	size_t len;
 	u8 msg[];
 };
diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
index fc78c3bd6721..3d46a37ca27c 100644
--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
@@ -88,7 +88,7 @@ static void pasn_fils_auth_resp(struct hostapd_data *hapd,
 
 static void handle_auth(struct hostapd_data *hapd,
 			const struct ieee80211_mgmt *mgmt, size_t len,
-			int rssi, int from_queue);
+			int rssi, int from_queue, bool no_sta);
 static int add_associated_sta(struct hostapd_data *hapd,
 			      struct sta_info *sta, int reassoc);
 #ifdef CONFIG_IEEE8021X_AUTH
@@ -451,10 +451,10 @@ static int send_auth_reply(struct hostapd_data *hapd, struct sta_info *sta,
 		    sta && sta->sae_postponed_commit) {
 			wpa_printf(MSG_DEBUG,
 				   "TESTING: Send postponed SAE Commit first, immediately followed by SAE Confirm");
-			if (hostapd_drv_send_mlme(hapd,
-						  sta->sae_postponed_commit,
-						  sta->sae_postponed_commit_len,
-						  0, NULL, 0, 0) < 0)
+			if (hostapd_drv_send_mgmt_resp(hapd,
+						       sta->sae_postponed_commit,
+						       sta->sae_postponed_commit_len,
+						       0, NULL, 0, 0, sta->no_sta) < 0)
 				wpa_printf(MSG_INFO, "send_auth_reply: send failed");
 			os_free(sta->sae_postponed_commit);
 			sta->sae_postponed_commit = NULL;
@@ -515,12 +515,16 @@ static int send_auth_reply(struct hostapd_data *hapd, struct sta_info *sta,
 		os_memcpy(ptr + 2, mic, mic_len);
 	}
 #endif /* CONFIF_IEEE8021X_AUTH */
-
-	if (hostapd_drv_send_mlme(hapd, reply, rlen, 0, NULL, 0, 0) < 0)
+	if (hostapd_drv_send_mgmt_resp(hapd, reply, rlen,
+				       0, NULL, 0, 0,
+				       sta ? sta->no_sta : false) < 0)
 		wpa_printf(MSG_INFO, "send_auth_reply: send failed");
 	else
 		reply_res = WLAN_STATUS_SUCCESS;
 
+	if (sta)
+		sta->no_sta = false;
+
 	os_free(buf);
 
 	return reply_res;
@@ -556,11 +560,12 @@ static void handle_auth_ft_finish(void *ctx, const u8 *dst,
 	struct sta_info *sta;
 	int reply_res;
 
-	reply_res = send_auth_reply(hapd, NULL, dst, WLAN_AUTH_FT,
+	sta = ap_get_sta(hapd, dst);
+	reply_res = send_auth_reply(hapd, NULL,
+				    sta ? sta->auth_reply_addr : dst,
+				    WLAN_AUTH_FT,
 				    auth_transaction, status, ies, ies_len,
 				    "auth-ft-finish");
-
-	sta = ap_get_sta(hapd, dst);
 	if (sta == NULL)
 		return;
 
@@ -1098,7 +1103,7 @@ static int auth_sae_send_commit(struct hostapd_data *hapd,
 		status = hapd->conf->sae_commit_status;
 	}
 #endif /* CONFIG_TESTING_OPTIONS */
-	reply_res = send_auth_reply(hapd, sta, sta->addr,
+	reply_res = send_auth_reply(hapd, sta, sta->auth_reply_addr,
 				    WLAN_AUTH_SAE, 1,
 				    status, wpabuf_head(data),
 				    wpabuf_len(data), "sae-send-commit");
@@ -1119,7 +1124,7 @@ static int auth_sae_send_confirm(struct hostapd_data *hapd,
 	if (data == NULL)
 		return WLAN_STATUS_UNSPECIFIED_FAILURE;
 
-	reply_res = send_auth_reply(hapd, sta, sta->addr,
+	reply_res = send_auth_reply(hapd, sta, sta->auth_reply_addr,
 				    WLAN_AUTH_SAE, 2,
 				    WLAN_STATUS_SUCCESS, wpabuf_head(data),
 				    wpabuf_len(data), "sae-send-confirm");
@@ -1754,6 +1759,10 @@ static void handle_auth_sae(struct hostapd_data *hapd, struct sta_info *sta,
 	const u8 *pos, *end;
 	int sta_removed = 0;
 	bool success_status;
+	const u8 *dst = sta->auth_reply_addr;
+
+	if (sta && sta->no_sta)
+		dst = mgmt->sa;
 
 	if (!groups) {
 		groups = default_groups;
@@ -1770,7 +1779,7 @@ static void handle_auth_sae(struct hostapd_data *hapd, struct sta_info *sta,
 		pos = mgmt->u.auth.variable;
 		end = ((const u8 *) mgmt) + len;
 		resp = status_code;
-		send_auth_reply(hapd, sta, sta->addr,
+		send_auth_reply(hapd, sta, dst,
 				WLAN_AUTH_SAE,
 				auth_transaction, resp, pos, end - pos,
 				"auth-sae-reflection-attack");
@@ -1780,7 +1789,7 @@ static void handle_auth_sae(struct hostapd_data *hapd, struct sta_info *sta,
 	if (hapd->conf->sae_commit_override &&
 	    auth_transaction == WLAN_AUTH_TR_SEQ_SAE_COMMIT) {
 		wpa_printf(MSG_DEBUG, "SAE: TESTING - commit override");
-		send_auth_reply(hapd, sta, sta->addr,
+		send_auth_reply(hapd, sta, dst,
 				WLAN_AUTH_SAE,
 				auth_transaction, resp,
 				wpabuf_head(hapd->conf->sae_commit_override),
@@ -2074,7 +2083,7 @@ reply:
 		    !data && end - pos >= 2)
 			data = wpabuf_alloc_copy(pos, 2);
 
-		send_auth_reply(hapd, sta, sta->addr,
+		send_auth_reply(hapd, sta, dst,
 				WLAN_AUTH_SAE,
 				auth_transaction, resp,
 				data ? wpabuf_head(data) : (u8 *) "",
@@ -2142,7 +2151,7 @@ void auth_sae_process_commit(void *eloop_ctx, void *user_ctx)
 		   "SAE: Process next available message from queue");
 	dl_list_del(&q->list);
 	handle_auth(hapd, (const struct ieee80211_mgmt *) q->msg, q->len,
-		    q->rssi, 1);
+		    q->rssi, 1, q->no_sta);
 	os_free(q);
 
 	if (eloop_is_timeout_registered(auth_sae_process_commit, hapd, NULL))
@@ -2155,7 +2164,7 @@ void auth_sae_process_commit(void *eloop_ctx, void *user_ctx)
 
 static void auth_sae_queue(struct hostapd_data *hapd,
 			   const struct ieee80211_mgmt *mgmt, size_t len,
-			   int rssi)
+			   int rssi, bool no_sta)
 {
 	struct hostapd_sae_commit_queue *q, *q2;
 	unsigned int queue_len;
@@ -2177,6 +2186,7 @@ static void auth_sae_queue(struct hostapd_data *hapd,
 		return;
 	q->rssi = rssi;
 	q->len = len;
+	q->no_sta = no_sta;
 	os_memcpy(q->msg, mgmt, len);
 
 	/* Check whether there is already a queued Authentication frame from the
@@ -3348,7 +3358,7 @@ static void handle_auth_fils_finish(struct hostapd_data *hapd,
 	auth_alg = (pub ||
 		    resp == WLAN_STATUS_FINITE_CYCLIC_GROUP_NOT_SUPPORTED) ?
 		WLAN_AUTH_FILS_SK_PFS : WLAN_AUTH_FILS_SK;
-	send_auth_reply(hapd, sta, sta->addr, auth_alg, 2, resp,
+	send_auth_reply(hapd, sta, sta->auth_reply_addr, auth_alg, 2, resp,
 			data ? wpabuf_head(data) : (u8 *) "",
 			data ? wpabuf_len(data) : 0, "auth-fils-finish");
 	wpabuf_free(data);
@@ -4223,7 +4233,7 @@ static void handle_auth_pasn(struct hostapd_data *hapd, struct sta_info *sta,
 
 static void handle_auth(struct hostapd_data *hapd,
 			const struct ieee80211_mgmt *mgmt, size_t len,
-			int rssi, int from_queue)
+			int rssi, int from_queue, bool frame_no_sta)
 {
 	u16 auth_alg, auth_transaction, status_code;
 	u16 resp = WLAN_STATUS_SUCCESS;
@@ -4236,6 +4246,7 @@ static void handle_auth(struct hostapd_data *hapd,
 	u16 seq_ctrl;
 	struct radius_sta rad_info;
 	const u8 *dst, *sa;
+	const u8 *mld_addr;
 	bool mld_sta = false;
 
 	if (len < IEEE80211_HDRLEN + sizeof(mgmt->u.auth)) {
@@ -4261,11 +4272,11 @@ static void handle_auth(struct hostapd_data *hapd,
 	 * the driver so that the station MLD MAC address would be used in both
 	 * hostapd and the driver.
 	 */
-	sa = hostapd_process_ml_auth(hapd, mgmt, len);
-	if (sa)
+	mld_addr = hostapd_process_ml_auth(hapd, mgmt, len);
+	if (mld_addr) {
 		mld_sta = true;
-	else
-		sa = mgmt->sa;
+		sa = mld_addr;
+	}
 #endif /* CONFIG_IEEE80211BE */
 
 	auth_alg = le_to_host16(mgmt->u.auth.auth_alg);
@@ -4282,12 +4293,12 @@ static void handle_auth(struct hostapd_data *hapd,
 
 	wpa_printf(MSG_DEBUG, "authentication: STA=" MACSTR " auth_alg=%d "
 		   "auth_transaction=%d status_code=%d protected=%d%s "
-		   "seq_ctrl=0x%x%s%s",
+		   "seq_ctrl=0x%x%s%s frame_no_sta=%d",
 		   MAC2STR(sa), auth_alg, auth_transaction,
 		   status_code, !!(fc & WLAN_FC_PROTECTED),
 		   challenge ? " challenge" : "",
 		   seq_ctrl, (fc & WLAN_FC_RETRY) ? " retry" : "",
-		   from_queue ? " (from queue)" : "");
+		   from_queue ? " (from queue)" : "", frame_no_sta);
 
 #ifdef CONFIG_NO_RC4
 	if (auth_alg == WLAN_AUTH_SHARED_KEY) {
@@ -4491,7 +4502,7 @@ static void handle_auth(struct hostapd_data *hapd,
 		 * be a queued commit message from the same peer. This is needed
 		 * to avoid reordering Authentication frames within the same
 		 * SAE exchange. */
-		auth_sae_queue(hapd, mgmt, len, rssi);
+		auth_sae_queue(hapd, mgmt, len, rssi, frame_no_sta);
 		return;
 	}
 #endif /* CONFIG_SAE */
@@ -4599,6 +4610,9 @@ static void handle_auth(struct hostapd_data *hapd,
 #ifdef CONFIG_MBO
 	sta->auth_rssi = rssi;
 #endif /* CONFIG_MBO */
+	os_memcpy(sta->auth_reply_addr,
+		  frame_no_sta ? mgmt->sa : sa, ETH_ALEN);
+	sta->no_sta = frame_no_sta;
 
 	res = ieee802_11_set_radius_info(hapd, sta, res, &rad_info);
 	if (res) {
@@ -4742,14 +4756,10 @@ static void handle_auth(struct hostapd_data *hapd,
 	}
 
  fail:
-	dst = mgmt->sa;
-
-#ifdef CONFIG_IEEE80211BE
-	if (ap_sta_is_mld(hapd, sta))
-		dst = sta->addr;
-#endif /* CONFIG_IEEE80211BE */
+	dst = frame_no_sta ? mgmt->sa : sa;
 
-	reply_res = send_auth_reply(hapd, sta, dst, auth_alg,
+	reply_res = send_auth_reply(hapd, sta, dst,
+				    auth_alg,
 				    auth_alg == WLAN_AUTH_SAE ?
 				    auth_transaction : auth_transaction + 1,
 				    resp, resp_ies, resp_ies_len,
@@ -8322,6 +8332,7 @@ int ieee802_11_mgmt(struct hostapd_data *hapd, const u8 *buf, size_t len,
 	int ret = 0;
 	unsigned int freq;
 	int ssi_signal = fi ? fi->ssi_signal : 0;
+	bool no_sta = fi ? fi->no_sta : false;
 
 	if (len < 24)
 		return 0;
@@ -8413,7 +8424,7 @@ int ieee802_11_mgmt(struct hostapd_data *hapd, const u8 *buf, size_t len,
 	switch (stype) {
 	case WLAN_FC_STYPE_AUTH:
 		wpa_printf(MSG_DEBUG, "mgmt::auth");
-		handle_auth(hapd, mgmt, len, ssi_signal, 0);
+		handle_auth(hapd, mgmt, len, ssi_signal, 0, no_sta);
 		ret = 1;
 		break;
 	case WLAN_FC_STYPE_ASSOC_REQ:
diff --git a/src/ap/sta_info.h b/src/ap/sta_info.h
index b721dcc8cfa4..baac3865b553 100644
--- a/src/ap/sta_info.h
+++ b/src/ap/sta_info.h
@@ -358,6 +358,10 @@ struct sta_info {
 	struct link_reconf_req_list *reconf_req;
 #endif /* CONFIG_IEEE80211BE */
 
+	u8 auth_reply_addr[ETH_ALEN];
+	/* Last received auth/assoc frame from driver had no_sta flag */
+	bool no_sta;
+
 	u16 max_idle_period; /* if nonzero, the granted BSS max idle period in
 			      * units of 1000 TUs */
 
diff --git a/src/drivers/driver.h b/src/drivers/driver.h
index 7284d863d2e4..0480664dad7e 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -3944,12 +3944,14 @@ struct wpa_driver_ops {
 	 *	(used only for testing purposes)
 	 * @wait: Time to wait off-channel for a response (in ms), or zero
 	 * @link_id: Link ID to use for TX, or -1 if not set
+	 * @no_sta: Valid when the kernel has no corresponding station entry
+	 *	    for the received frame
 	 * Returns: 0 on success, -1 on failure
 	 */
 	int (*send_mlme)(void *priv, const u8 *data, size_t data_len,
 			 int noack, unsigned int freq, const u16 *csa_offs,
 			 size_t csa_offs_len, int no_encrypt,
-			 unsigned int wait, int link_id);
+			 unsigned int wait, int link_id, bool no_sta);
 
 	/**
 	 * update_ft_ies - Update FT (IEEE 802.11r) IEs
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 4b70a304fc3d..7b5325153689 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -173,7 +173,8 @@ static int nl80211_send_frame_cmd(struct i802_bss *bss,
 				  const u8 *buf, size_t buf_len,
 				  int save_cookie, int no_cck, int no_ack,
 				  int offchanok, const u16 *csa_offs,
-				  size_t csa_offs_len, int link_id);
+				  size_t csa_offs_len, int link_id,
+				  bool no_sta);
 static int wpa_driver_nl80211_probe_req_report(struct i802_bss *bss,
 					       int report);
 
@@ -4927,7 +4928,7 @@ static int wpa_driver_nl80211_send_mlme(struct i802_bss *bss, const u8 *data,
 					unsigned int wait_time,
 					const u16 *csa_offs,
 					size_t csa_offs_len, int no_encrypt,
-					int link_id)
+					int link_id, bool no_sta)
 {
 	struct wpa_driver_nl80211_data *drv = bss->drv;
 	struct ieee80211_mgmt *mgmt;
@@ -4943,10 +4944,11 @@ static int wpa_driver_nl80211_send_mlme(struct i802_bss *bss, const u8 *data,
 	fc = le_to_host16(mgmt->frame_control);
 	wpa_printf(MSG_DEBUG, "nl80211: send_mlme - da=" MACSTR " sa=" MACSTR
 		   " bssid=" MACSTR
-		   " noack=%d freq=%u no_cck=%d offchanok=%d wait_time=%u no_encrypt=%d fc=0x%x (%s) nlmode=%d",
+		   " noack=%d freq=%u no_cck=%d offchanok=%d wait_time=%u no_encrypt=%d fc=0x%x (%s) nlmode=%d"
+		   " no_sta=%d",
 		   MAC2STR(mgmt->da), MAC2STR(mgmt->sa), MAC2STR(mgmt->bssid),
 		   noack, freq, no_cck, offchanok, wait_time,
-		   no_encrypt, fc, fc2str(fc), drv->nlmode);
+		   no_encrypt, fc, fc2str(fc), drv->nlmode, no_sta);
 
 #ifdef CONFIG_PR
 	/* Route MLME TX via PD wdev if source address matches */
@@ -5059,7 +5061,7 @@ send_frame_cmd:
 	wpa_printf(MSG_DEBUG, "nl80211: send_mlme -> send_frame_cmd");
 	res = nl80211_send_frame_cmd(bss, freq, wait_time, data, data_len,
 				     use_cookie, no_cck, noack, offchanok,
-				     csa_offs, csa_offs_len, link_id);
+				     csa_offs, csa_offs_len, link_id, no_sta);
 	if (!res)
 		drv->send_frame_link_id = link_id;
 
@@ -9199,7 +9201,7 @@ static int i802_sta_deauth(void *priv, const u8 *own_addr, const u8 *addr,
 	return wpa_driver_nl80211_send_mlme(bss, (u8 *) &mgmt,
 					    IEEE80211_HDRLEN +
 					    sizeof(mgmt.u.deauth), 0, 0, 0, 0,
-					    0, NULL, 0, 0, link_id);
+					    0, NULL, 0, 0, link_id, false);
 }
 
 
@@ -9226,7 +9228,7 @@ static int i802_sta_disassoc(void *priv, const u8 *own_addr, const u8 *addr,
 	return wpa_driver_nl80211_send_mlme(bss, (u8 *) &mgmt,
 					    IEEE80211_HDRLEN +
 					    sizeof(mgmt.u.disassoc), 0, 0, 0, 0,
-					    0, NULL, 0, 0, link_id);
+					    0, NULL, 0, 0, link_id, false);
 }
 
 
@@ -9989,7 +9991,8 @@ static int nl80211_send_frame_cmd(struct i802_bss *bss,
 				  const u8 *buf, size_t buf_len,
 				  int save_cookie, int no_cck, int no_ack,
 				  int offchanok, const u16 *csa_offs,
-				  size_t csa_offs_len, int link_id)
+				  size_t csa_offs_len, int link_id,
+				  bool no_sta)
 {
 	struct wpa_driver_nl80211_data *drv = bss->drv;
 	struct nl_msg *msg;
@@ -10013,7 +10016,8 @@ static int nl80211_send_frame_cmd(struct i802_bss *bss,
 	    (no_ack && nla_put_flag(msg, NL80211_ATTR_DONT_WAIT_FOR_ACK)) ||
 	    (csa_offs && nla_put(msg, NL80211_ATTR_CSA_C_OFFSETS_TX,
 				 csa_offs_len * sizeof(u16), csa_offs)) ||
-	    nla_put(msg, NL80211_ATTR_FRAME, buf_len, buf))
+	    nla_put(msg, NL80211_ATTR_FRAME, buf_len, buf) ||
+	    (no_sta && nla_put_flag(msg, NL80211_ATTR_FRAME_CMD_NO_STA)))
 		goto fail;
 
 	cookie = 0;
@@ -10140,11 +10144,11 @@ static int wpa_driver_nl80211_send_action(struct i802_bss *bss,
 		ret = wpa_driver_nl80211_send_mlme(bss, buf, 24 + data_len,
 						   0, freq, no_cck, offchanok,
 						   wait_time, NULL, 0, 0,
-						   link_id);
+						   link_id, false);
 	else
 		ret = nl80211_send_frame_cmd(bss, freq, wait_time, buf,
 					     24 + data_len, 1, no_cck, 0,
-					     offchanok, NULL, 0, link_id);
+					     offchanok, NULL, 0, link_id, false);
 
 	os_free(buf);
 	return ret;
@@ -11424,7 +11428,7 @@ static void nl80211_send_null_frame(struct i802_bss *bss, const u8 *own_addr,
 	os_memcpy(nulldata.hdr.IEEE80211_SA_FROMDS, own_addr, ETH_ALEN);
 
 	if (wpa_driver_nl80211_send_mlme(bss, (u8 *) &nulldata, size, 0, 0, 0,
-					 0, 0, NULL, 0, 0, -1) < 0)
+					 0, 0, NULL, 0, 0, -1, false) < 0)
 		wpa_printf(MSG_DEBUG, "nl80211_send_null_frame: Failed to "
 			   "send poll frame");
 }
@@ -11924,12 +11928,13 @@ static int driver_nl80211_send_mlme(void *priv, const u8 *data,
 				    unsigned int freq,
 				    const u16 *csa_offs, size_t csa_offs_len,
 				    int no_encrypt, unsigned int wait,
-				    int link_id)
+				    int link_id, bool no_sta)
 {
 	struct i802_bss *bss = priv;
 	return wpa_driver_nl80211_send_mlme(bss, data, data_len, noack,
 					    freq, 0, 0, wait, csa_offs,
-					    csa_offs_len, no_encrypt, link_id);
+					    csa_offs_len, no_encrypt, link_id,
+					    no_sta);
 }
 
 
diff --git a/wpa_supplicant/driver_i.h b/wpa_supplicant/driver_i.h
index 7d8b806a4547..55fceacb1702 100644
--- a/wpa_supplicant/driver_i.h
+++ b/wpa_supplicant/driver_i.h
@@ -341,7 +341,7 @@ static inline int wpa_drv_send_mlme(struct wpa_supplicant *wpa_s,
 	if (wpa_s->driver->send_mlme)
 		return wpa_s->driver->send_mlme(wpa_s->drv_priv,
 						data, data_len, noack,
-						freq, NULL, 0, 0, wait, -1);
+						freq, NULL, 0, 0, wait, -1, false);
 	return -1;
 }
 
diff --git a/wpa_supplicant/mesh_mpm.c b/wpa_supplicant/mesh_mpm.c
index 66684c99c67d..2ed3b9abafe0 100644
--- a/wpa_supplicant/mesh_mpm.c
+++ b/wpa_supplicant/mesh_mpm.c
@@ -800,6 +800,7 @@ static struct sta_info * mesh_mpm_add_peer(struct wpa_supplicant *wpa_s,
 		return NULL;
 	}
 
+	os_memcpy(sta->auth_reply_addr, addr, ETH_ALEN);
 	/* insert into driver */
 	os_memset(&params, 0, sizeof(params));
 	params.supp_rates = sta->supported_rates;
-- 
2.34.1




More information about the Hostap mailing list