mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-28 18:28:23 -05:00
ACS: Channel selection based freqlist
When doing ACS, check freqlist also if it is specified. Signed-off-by: neojou <neojou@gmail.com>
This commit is contained in:
parent
34ac7d871a
commit
025ab330b4
20
src/ap/acs.c
20
src/ap/acs.c
@ -512,6 +512,17 @@ static int is_in_chanlist(struct hostapd_iface *iface,
|
||||
}
|
||||
|
||||
|
||||
static int is_in_freqlist(struct hostapd_iface *iface,
|
||||
struct hostapd_channel_data *chan)
|
||||
{
|
||||
if (!iface->conf->acs_freq_list.num)
|
||||
return 1;
|
||||
|
||||
return freq_range_list_includes(&iface->conf->acs_freq_list,
|
||||
chan->freq);
|
||||
}
|
||||
|
||||
|
||||
static void acs_survey_mode_interference_factor(
|
||||
struct hostapd_iface *iface, struct hostapd_hw_modes *mode)
|
||||
{
|
||||
@ -527,6 +538,9 @@ static void acs_survey_mode_interference_factor(
|
||||
if (!is_in_chanlist(iface, chan))
|
||||
continue;
|
||||
|
||||
if (!is_in_freqlist(iface, chan))
|
||||
continue;
|
||||
|
||||
wpa_printf(MSG_DEBUG, "ACS: Survey analysis for channel %d (%d MHz)",
|
||||
chan->chan, chan->freq);
|
||||
|
||||
@ -651,6 +665,9 @@ acs_find_ideal_chan_mode(struct hostapd_iface *iface,
|
||||
if (!is_in_chanlist(iface, chan))
|
||||
continue;
|
||||
|
||||
if (!is_in_freqlist(iface, chan))
|
||||
continue;
|
||||
|
||||
if (!chan_bw_allowed(chan, bw, 1, 1)) {
|
||||
wpa_printf(MSG_DEBUG,
|
||||
"ACS: Channel %d: BW %u is not supported",
|
||||
@ -1013,6 +1030,9 @@ static int * acs_request_scan_add_freqs(struct hostapd_iface *iface,
|
||||
if (!is_in_chanlist(iface, chan))
|
||||
continue;
|
||||
|
||||
if (!is_in_freqlist(iface, chan))
|
||||
continue;
|
||||
|
||||
*freq++ = chan->freq;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user