bgscan_learn: Prevent infinite busy looping
In highly congested network (BSSes almost on every channel within ESS) we have hit a bug when wpa_supplicant become completly irresponsive, infinite looping on while loop. When probe_idx was equal 0 and we are not able to probe new frequency, following condition were never fulfilled: "if (!in_array(freqs, data->supp_freqs[idx]))" Signed-hostap: Pawel Kulakowski <pawel.kulakowski@tieto.com>
This commit is contained in:
parent
99276998fa
commit
548f100384
1 changed files with 4 additions and 1 deletions
|
@ -242,8 +242,11 @@ static int * bgscan_learn_get_probe_freq(struct bgscan_learn_data *data,
|
|||
|
||||
idx = data->probe_idx + 1;
|
||||
while (idx != data->probe_idx) {
|
||||
if (data->supp_freqs[idx] == 0)
|
||||
if (data->supp_freqs[idx] == 0) {
|
||||
if (data->probe_idx == 0)
|
||||
break;
|
||||
idx = 0;
|
||||
}
|
||||
if (!in_array(freqs, data->supp_freqs[idx])) {
|
||||
wpa_printf(MSG_DEBUG, "bgscan learn: Probe new freq "
|
||||
"%u", data->supp_freqs[idx]);
|
||||
|
|
Loading…
Reference in a new issue