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>
This commit is contained in:
		
							parent
							
								
									9f9a148af6
								
							
						
					
					
						commit
						b967b5e859
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		|  | @ -1109,7 +1109,9 @@ static void wpa_supplicant_scan(void *eloop_ctx, void *timeout_ctx) | ||||||
| 		     tssid = tssid->next) { | 		     tssid = tssid->next) { | ||||||
| 			if (wpas_network_disabled(wpa_s, tssid)) | 			if (wpas_network_disabled(wpa_s, tssid)) | ||||||
| 				continue; | 				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(¶ms.freqs, | 				int_array_concat(¶ms.freqs, | ||||||
| 						 tssid->scan_freq); | 						 tssid->scan_freq); | ||||||
| 			} else { | 			} else { | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue
	
	 Jouni Malinen
						Jouni Malinen