[PATCH] Dont exceed scan ssid max size advertised by driver

Roshan Pius rpius at google.com
Wed Jun 29 16:55:27 PDT 2016


Currently |wpa_set_scan_ssids| fully exhausts
|wpa_driver_scan_params.ssid| list when hidden network ID's
are provided via the control interface. This results in us
exceeding the max size for the list advertised by the driver when we add
the "wildcard" scan ssid entry. So, ensure that we leave space for one
more scan ssid entry in the list when we exit out of |wpa_set_scan_ssids|.

Signed-off-by: Roshan Pius <rpius at google.com>
---
 wpa_supplicant/scan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c
index 7a52826..8a29522 100644
--- a/wpa_supplicant/scan.c
+++ b/wpa_supplicant/scan.c
@@ -593,7 +593,7 @@ static void wpa_set_scan_ssids(struct wpa_supplicant *wpa_s,
 		if (j < params->num_ssids)
 			continue; /* already in the list */
 
-		if (params->num_ssids + 1 > max_ssids) {
+		if (params->num_ssids + 1 >= max_ssids) {
 			wpa_printf(MSG_DEBUG,
 				   "Over max scan SSIDs for manual request");
 			break;
-- 
2.8.0.rc3.226.g39d4020




More information about the Hostap mailing list