Message ID | 20220506030236.26755-1-MeiChia.Chiu@mediatek.com |
---|---|
State | Accepted |
Headers | show |
Series | hostapd: add the destination address of unsolicited probe response | expand |
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 --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);