mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-25 00:38:24 -05:00
DFS: Enter DFS state if no available channel is found
Previously hostapd would not stop transmitting when a DFS event was detected and no available channel to switch to was available. Disable and re-enable the interface to enter DFS state. This way, TX does not happen until the kernel notifies hostapd about the NOP expiring. Signed-off-by: David Bauer <mail@david-bauer.net>
This commit is contained in:
parent
eee0d242bb
commit
4683b72183
12
src/ap/dfs.c
12
src/ap/dfs.c
@ -1070,8 +1070,16 @@ static int hostapd_dfs_start_channel_switch(struct hostapd_iface *iface)
|
||||
&oper_centr_freq_seg0_idx,
|
||||
&oper_centr_freq_seg1_idx,
|
||||
&skip_radar);
|
||||
if (!channel)
|
||||
return err;
|
||||
if (!channel) {
|
||||
/*
|
||||
* Toggle interface state to enter DFS state
|
||||
* until NOP is finished.
|
||||
*/
|
||||
hostapd_disable_iface(iface);
|
||||
hostapd_enable_iface(iface);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!skip_radar) {
|
||||
iface->freq = channel->freq;
|
||||
iface->conf->channel = channel->chan;
|
||||
|
Loading…
Reference in New Issue
Block a user