mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-25 00:38:24 -05:00
Restore wpa_s->scan_req if scan trigger fails
If the driver rejects the scan request while handling an external requested scan (e.g., SCAN command on ctrl_iface), wpa_s->scan_req gets cleared in wpa_supplicant_scan(). This can results in issues when the scheduled re-try of the scan in one seconds trigger another call to this function. If ap_scan==2 mode is used, this would result in new association attempt instead of a new scan. Avoid this by restoring value of wpa_s->scan_req in case the scan trigger fails and a new scan attempt is scheduled. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
340f1c48f7
commit
23270cd8f5
@ -696,6 +696,8 @@ scan:
|
|||||||
wpa_msg(wpa_s, MSG_WARNING, "Failed to initiate AP scan");
|
wpa_msg(wpa_s, MSG_WARNING, "Failed to initiate AP scan");
|
||||||
if (prev_state != wpa_s->wpa_state)
|
if (prev_state != wpa_s->wpa_state)
|
||||||
wpa_supplicant_set_state(wpa_s, prev_state);
|
wpa_supplicant_set_state(wpa_s, prev_state);
|
||||||
|
/* Restore scan_req since we will try to scan again */
|
||||||
|
wpa_s->scan_req = scan_req;
|
||||||
wpa_supplicant_req_scan(wpa_s, 1, 0);
|
wpa_supplicant_req_scan(wpa_s, 1, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user