aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2020-03-22 16:51:41 (GMT)
committerJouni Malinen <j@w1.fi>2020-03-22 16:51:41 (GMT)
commitb967b5e859149d53cb32bc0b37a6ef60a8b1f554 (patch)
treea3dd5a7c23b81ea3050615a3ed09602709283bf8
parent9f9a148af609d9dd2928287e6fa18b06a96ec7ee (diff)
downloadhostap-b967b5e859149d53cb32bc0b37a6ef60a8b1f554.zip
hostap-b967b5e859149d53cb32bc0b37a6ef60a8b1f554.tar.gz
hostap-b967b5e859149d53cb32bc0b37a6ef60a8b1f554.tar.bz2
Limit scan frequency list to 100 entries
There is no real use case for the scan to be requested on more than 100 channels individually. To avoid excessively long lists with invalid configuration, use 100 entry limit for the list before dropping to the fallback scan-all-channels option. Signed-off-by: Jouni Malinen <j@w1.fi>
-rw-r--r--wpa_supplicant/scan.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c
index ad9d77a..b475730 100644
--- a/wpa_supplicant/scan.c
+++ b/wpa_supplicant/scan.c
@@ -1109,7 +1109,9 @@ static void wpa_supplicant_scan(void *eloop_ctx, void *timeout_ctx)
tssid = tssid->next) {
if (wpas_network_disabled(wpa_s, tssid))
continue;
- if ((params.freqs || !freqs_set) && tssid->scan_freq) {
+ if (((params.freqs || !freqs_set) &&
+ tssid->scan_freq) &&
+ int_array_len(params.freqs) < 100) {
int_array_concat(&params.freqs,
tssid->scan_freq);
} else {