mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-28 18:28:23 -05:00
Clear scan_res_handler on no-retry failure
Previously it was possible for wpa_s->scan_res_handler to remain set to its old value in case wpa_drv_scan() failed and no retry for the scan trigger was scheduled (i.e., when last_scan_req == MANUAL_SCAN_REQ). This could result in getting stuck with the next connection attempt after a failed "SCAN TYPE=ONLY" operation when wpa_s->scan_res_handler was set to scan_only_handler(). Fix this by clearing wpa_s->scan_res_handler if wpa_drv_scan() fails and no retry is scheduled. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
c97d7c2a60
commit
57d3c5913a
@ -208,6 +208,9 @@ static void wpas_trigger_scan_cb(struct wpa_radio_work *work, int deinit)
|
||||
/* Restore scan_req since we will try to scan again */
|
||||
wpa_s->scan_req = wpa_s->last_scan_req;
|
||||
wpa_supplicant_req_scan(wpa_s, 1, 0);
|
||||
} else if (wpa_s->scan_res_handler) {
|
||||
/* Clear the scan_res_handler */
|
||||
wpa_s->scan_res_handler = NULL;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user