[PATCH] hostapd: add the destination address of unsolicited probe response

MeiChia Chiu MeiChia.Chiu at mediatek.com
Thu May 5 20:02:36 PDT 2022


From: MeiChia Chiu <meichia.chiu at 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 at mediatek.com>
---
 src/ap/beacon.c | 3 +++
 1 file changed, 3 insertions(+)

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);
-- 
2.29.2




More information about the Hostap mailing list