mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-28 18:28:23 -05:00
sched scan: Fix passive scanning
Scan wasn't initiated in case the config contained only networks without scan_ssid. In such a case we want scan to be initiated without any SSIDs to actively scan but include all the SSIDs in the filter list. Also added some debug logs to easily see which SSIDs were included in which list. Cc: Luciano Coelho <coelho@ti.com> Signed-off-by: Eyal Shapira <eyal@wizery.com>
This commit is contained in:
parent
e159cc5e9b
commit
1966e3d1b7
@ -710,8 +710,10 @@ int wpa_supplicant_req_sched_scan(struct wpa_supplicant *wpa_s)
|
||||
else
|
||||
max_sched_scan_ssids = wpa_s->max_sched_scan_ssids;
|
||||
|
||||
if (wpa_s->sched_scanning)
|
||||
if (wpa_s->sched_scanning) {
|
||||
wpa_dbg(wpa_s, MSG_DEBUG, "Already sched scanning");
|
||||
return 0;
|
||||
}
|
||||
|
||||
os_memset(¶ms, 0, sizeof(params));
|
||||
|
||||
@ -754,6 +756,8 @@ int wpa_supplicant_req_sched_scan(struct wpa_supplicant *wpa_s)
|
||||
}
|
||||
|
||||
if (params.filter_ssids && ssid->ssid && ssid->ssid_len) {
|
||||
wpa_dbg(wpa_s, MSG_DEBUG, "add to filter ssid: %s",
|
||||
wpa_ssid_txt(ssid->ssid, ssid->ssid_len));
|
||||
os_memcpy(params.filter_ssids[params.num_filter_ssids].ssid,
|
||||
ssid->ssid, ssid->ssid_len);
|
||||
params.filter_ssids[params.num_filter_ssids].ssid_len =
|
||||
@ -762,6 +766,8 @@ int wpa_supplicant_req_sched_scan(struct wpa_supplicant *wpa_s)
|
||||
}
|
||||
|
||||
if (ssid->scan_ssid) {
|
||||
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;
|
||||
params.ssids[params.num_ssids].ssid_len =
|
||||
@ -779,11 +785,6 @@ int wpa_supplicant_req_sched_scan(struct wpa_supplicant *wpa_s)
|
||||
ssid = ssid->next;
|
||||
}
|
||||
|
||||
if (!params.num_ssids) {
|
||||
os_free(params.filter_ssids);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (wpa_s->wps)
|
||||
wps_ie = wpa_supplicant_extra_ies(wpa_s, ¶ms);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user