Browse Source

Do not try to add wildcard SSID into active sched_scan

Even though scan_ssid should not really be set for wildcard SSID,
better verify that here explicitly insead of assuming that the
SSID is set.

Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen 13 years ago
parent
commit
3f56f3a496
1 changed files with 3 additions and 2 deletions
  1. 3 2
      wpa_supplicant/scan.c

+ 3 - 2
wpa_supplicant/scan.c

@@ -765,8 +765,9 @@ int wpa_supplicant_req_sched_scan(struct wpa_supplicant *wpa_s)
 			params.num_filter_ssids++;
 		}
 
-		if (ssid->scan_ssid) {
-			wpa_dbg(wpa_s, MSG_DEBUG, "add to active scan ssid: %s",
+		if (ssid->scan_ssid && ssid->ssid && ssid->ssid_len) {
+			wpa_dbg(wpa_s, MSG_DEBUG,
+				"add to active scan ssid: %s",
 				wpa_ssid_txt(ssid->ssid, ssid->ssid_len));
 			params.ssids[params.num_ssids].ssid =
 				ssid->ssid;