developer | faf1ea2 | 2022-04-29 17:53:25 +0800 | [diff] [blame^] | 1 | From b5928412d6debbaf624f9d91650b3a60443e3099 Mon Sep 17 00:00:00 2001 |
| 2 | From: MeiChia Chiu <meichia.chiu@mediatek.com> |
| 3 | Date: Tue, 26 Apr 2022 11:21:14 +0800 |
| 4 | Subject: [PATCH] hostapd: add destination address of unsolicited probe |
| 5 | response |
| 6 | |
| 7 | without this patch, hostapd generates probe responses with |
| 8 | null destination address when ap enables unsolicited probe response. |
| 9 | |
| 10 | Signed-off-by: MeiChia Chiu <meichia.chiu@mediatek.com> |
| 11 | --- |
| 12 | src/ap/beacon.c | 3 +++ |
| 13 | 1 file changed, 3 insertions(+) |
| 14 | |
| 15 | diff --git a/src/ap/beacon.c b/src/ap/beacon.c |
| 16 | index 8cd1c4170..3c49653cc 100644 |
| 17 | --- a/src/ap/beacon.c |
| 18 | +++ b/src/ap/beacon.c |
| 19 | @@ -484,6 +484,9 @@ static u8 * hostapd_gen_probe_resp(struct hostapd_data *hapd, |
| 20 | WLAN_FC_STYPE_PROBE_RESP); |
| 21 | if (req) |
| 22 | os_memcpy(resp->da, req->sa, ETH_ALEN); |
| 23 | + else if (hapd->conf->unsol_bcast_probe_resp_interval > 0) |
| 24 | + os_memset(resp->da, 0xff, ETH_ALEN); |
| 25 | + |
| 26 | os_memcpy(resp->sa, hapd->own_addr, ETH_ALEN); |
| 27 | |
| 28 | os_memcpy(resp->bssid, hapd->own_addr, ETH_ALEN); |
| 29 | -- |
| 30 | 2.29.2 |
| 31 | |