mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-16 17:09:24 +01:00
scan: don't survey on external scans
Since surveys end up making driver calls in the kernel its not entirely known how they are implemented or how long they will take. For this reason the survey will be skipped if getting the results from an external scan. Doing this also fixes a crash caused by external scans where the scan request pointer is not checked and dereferenced: 0x00005ffa6a0376de in get_survey_done (user_data=0x5ffa783a3f90) at src/scan.c:2059 0x0000749646a29bbd in ?? () from /usr/lib/libell.so.0 0x0000749646a243cb in ?? () from /usr/lib/libell.so.0 0x0000749646a24655 in l_main_iterate () from /usr/lib/libell.so.0 0x0000749646a24ace in l_main_run () from /usr/lib/libell.so.0 0x0000749646a263a4 in l_main_run_with_signal () from /usr/lib/libell.so.0 0x00005ffa6a00d642 in main (argc=<optimized out>, argv=<optimized out>) at src/main.c:614 Reported-by: Daniel Bond <danielbondno@gmail.com>
This commit is contained in:
parent
f6cfcb8ca2
commit
3bc8b90c0e
@ -2089,9 +2089,10 @@ static void scan_get_results(struct scan_context *sc, struct scan_request *sr,
|
|||||||
results->bss_list = l_queue_new();
|
results->bss_list = l_queue_new();
|
||||||
results->freqs = freqs;
|
results->freqs = freqs;
|
||||||
|
|
||||||
if (scan_survey(results))
|
/* If there is no scan request (external scan), just get the results */
|
||||||
|
if (sr && scan_survey(results))
|
||||||
return;
|
return;
|
||||||
else
|
else if (sr)
|
||||||
l_warn("failed to start a scan survey");
|
l_warn("failed to start a scan survey");
|
||||||
|
|
||||||
get_results(results);
|
get_results(results);
|
||||||
|
Loading…
Reference in New Issue
Block a user