[PATCH] RRM: Fix number of SSIDs in scan for beacon report

Andrei Otcheretianski andrei.otcheretianski at intel.com
Wed Mar 8 00:54:37 PST 2017


From: Avraham Stern <avraham.stern at intel.com>

When requesting a scan for beacon report request, the number of
SSIDs is always set to one, even when no SSID subelement is
present in the measurement request.

Fix this by setting the SSID in the scan parameters only if the
SSID subelement is actually present in the measurement request.

Signed-off-by: Avraham Stern <avraham.stern at intel.com>
---
 wpa_supplicant/rrm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/wpa_supplicant/rrm.c b/wpa_supplicant/rrm.c
index 5be917c..f4e7360 100644
--- a/wpa_supplicant/rrm.c
+++ b/wpa_supplicant/rrm.c
@@ -1085,7 +1085,7 @@ wpas_rm_handle_beacon_req(struct wpa_supplicant *wpa_s,
 
 	params->only_new_results = 1;
 
-	if (req->mode == BEACON_REPORT_MODE_ACTIVE) {
+	if (req->mode == BEACON_REPORT_MODE_ACTIVE && data->ssid_len) {
 		params->ssids[params->num_ssids].ssid = data->ssid;
 		params->ssids[params->num_ssids++].ssid_len = data->ssid_len;
 	}
-- 
1.9.1




More information about the Hostap mailing list