diff mbox series

[V2,6/7] multiple_bssid: always use the transmitting BSSs when generating the beacons

Message ID 20200706125031.668258-7-john@phrozen.org
State Superseded
Headers show
Series multiple_bssid: add support | expand

Commit Message

John Crispin July 6, 2020, 12:50 p.m. UTC
When generating a beacon or probe response for a non transmitting BSS,
always use the transmittings BSSs data. If thie is a legacy beacon, the
helper becomes a no-op.

Signed-off-by: John Crispin <john@phrozen.org>
---
 src/ap/beacon.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/src/ap/beacon.c b/src/ap/beacon.c
index 2ba374c68..03cca305a 100644
--- a/src/ap/beacon.c
+++ b/src/ap/beacon.c
@@ -1042,7 +1042,7 @@  void handle_probe_req(struct hostapd_data *hapd,
 	wpa_msg_ctrl(hapd->msg_ctx, MSG_INFO, RX_PROBE_REQUEST "sa=" MACSTR
 		     " signal=%d", MAC2STR(mgmt->sa), ssi_signal);
 
-	resp = hostapd_gen_probe_resp(hapd, mgmt, elems.p2p != NULL,
+	resp = hostapd_gen_probe_resp(hostapd_get_primary_bss(hapd), mgmt, elems.p2p != NULL,
 				      &resp_len);
 	if (resp == NULL)
 		return;
@@ -1065,7 +1065,7 @@  void handle_probe_req(struct hostapd_data *hapd,
 				hapd->cs_c_off_ecsa_proberesp;
 	}
 
-	ret = hostapd_drv_send_mlme(hapd, resp, resp_len, noack,
+	ret = hostapd_drv_send_mlme(hostapd_get_primary_bss(hapd), resp, resp_len, noack,
 				    csa_offs_len ? csa_offs : NULL,
 				    csa_offs_len, 0);