diff mbox series

hostapd: add the destination address of unsolicited probe response

Message ID 20220506030236.26755-1-MeiChia.Chiu@mediatek.com
State Accepted
Headers show
Series hostapd: add the destination address of unsolicited probe response | expand

Commit Message

MeiChia Chiu May 6, 2022, 3:02 a.m. UTC
From: MeiChia Chiu <meichia.chiu@mediatek.com>

without this patch, hostapd generates probe responses with
the null destination address when hostapd enables unsolicited probe response.

Signed-off-by: MeiChia Chiu <meichia.chiu@mediatek.com>
---
 src/ap/beacon.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Jouni Malinen May 9, 2022, 8:50 a.m. UTC | #1
On Fri, May 06, 2022 at 11:02:36AM +0800, MeiChia Chiu wrote:
> without this patch, hostapd generates probe responses with
> the null destination address when hostapd enables unsolicited probe response.

Thanks, applied with some changes to avoid modifying the unicast Probe
Response frame template case.
diff mbox series

Patch

diff --git a/src/ap/beacon.c b/src/ap/beacon.c
index eaa403326..ecbeb4299 100644
--- a/src/ap/beacon.c
+++ b/src/ap/beacon.c
@@ -531,6 +531,9 @@  static u8 * hostapd_gen_probe_resp(struct hostapd_data *hapd,
 					   WLAN_FC_STYPE_PROBE_RESP);
 	if (req)
 		os_memcpy(resp->da, req->sa, ETH_ALEN);
+	else if (hapd->conf->unsol_bcast_probe_resp_interval > 0)
+		os_memset(resp->da, 0xff, ETH_ALEN);
+
 	os_memcpy(resp->sa, hapd->own_addr, ETH_ALEN);
 
 	os_memcpy(resp->bssid, hapd->own_addr, ETH_ALEN);