mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-02-16 09:03:05 -05:00
DFS: Fix range availability check
There's off-by-one in the range availability check - the case of first_chan_idx + num_chans == num_channels should be allowed (e.g., 0 + 1 == 1, for the case of a single 20 MHz channel). Signed-off-by: Maital Hahn <maitalm@ti.com> Signed-off-by: Eliad Peller <eliad@wizery.com>
This commit is contained in:
parent
56ef99255c
commit
030a3e12da
@ -143,7 +143,7 @@ static int dfs_chan_range_available(struct hostapd_hw_modes *mode,
|
||||
struct hostapd_channel_data *first_chan, *chan;
|
||||
int i;
|
||||
|
||||
if (first_chan_idx + num_chans >= mode->num_channels)
|
||||
if (first_chan_idx + num_chans > mode->num_channels)
|
||||
return 0;
|
||||
|
||||
first_chan = &mode->channels[first_chan_idx];
|
||||
|
Loading…
x
Reference in New Issue
Block a user