mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-25 08:48:31 -05:00
DFS: Fix hostapd operation without hw_mode driver data
If DFS implementation was built in, some configurations with drivers that do not provide mode information could end up dereferencing a NULL pointer. Fix this by skipping DFS operations in such cases since not having information about modes and channels means that hostapd could not perform DFS anyway (i.e., either this is not a wireless driver or the driver takes care of DFS internally). Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
e9b783d58c
commit
afbe57d981
10
src/ap/dfs.c
10
src/ap/dfs.c
@ -640,6 +640,16 @@ int hostapd_handle_dfs(struct hostapd_iface *iface)
|
||||
int res, n_chans, n_chans1, start_chan_idx, start_chan_idx1;
|
||||
int skip_radar = 0;
|
||||
|
||||
if (!iface->current_mode) {
|
||||
/*
|
||||
* This can happen with drivers that do not provide mode
|
||||
* information and as such, cannot really use hostapd for DFS.
|
||||
*/
|
||||
wpa_printf(MSG_DEBUG,
|
||||
"DFS: No current_mode information - assume no need to perform DFS operations by hostapd");
|
||||
return 1;
|
||||
}
|
||||
|
||||
iface->cac_started = 0;
|
||||
|
||||
do {
|
||||
|
Loading…
Reference in New Issue
Block a user