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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 wpa_supplicant/scan.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c
index 7a52826..7f42607 100644
--- a/wpa_supplicant/scan.c
+++ b/wpa_supplicant/scan.c
@@ -575,6 +575,11 @@ static void wpa_set_scan_ssids(struct wpa_supplicant *wpa_s,
 {
 	unsigned int i;
 	struct wpa_ssid *ssid;
+	/*
+	 * For devices with |max_ssids| greater than 1, leave the last slot empty
+	 * for adding the wildcard scan entry.
+	 */
+	max_ssids = (max_ssids == 1) ? max_ssids : max_ssids - 1;
 
 	for (i = 0; i < wpa_s->scan_id_count; i++) {
 		unsigned int j;
-- 
2.8.0.rc3.226.g39d4020


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux