mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-25 08:48:31 -05:00
DFS: Make sure center frequency is always initialized for VHT
This seemed to be fine on most code paths, but the code was complex enough to make the analysis difficult (and a bit too much for static analyzers). There is no harm in forcing these parameters to be initialized, so do that to make sure they cannot be left uninitialized. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
fa0a9f536c
commit
3d91a0470f
@ -214,6 +214,7 @@ static void dfs_adjust_vht_center_freq(struct hostapd_iface *iface,
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
wpa_printf(MSG_INFO, "DFS only VHT20/40/80/160 is supported now");
|
wpa_printf(MSG_INFO, "DFS only VHT20/40/80/160 is supported now");
|
||||||
|
*vht_oper_centr_freq_seg0_idx = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -359,6 +360,9 @@ dfs_get_valid_channel(struct hostapd_iface *iface,
|
|||||||
u32 _rand;
|
u32 _rand;
|
||||||
|
|
||||||
wpa_printf(MSG_DEBUG, "DFS: Selecting random channel");
|
wpa_printf(MSG_DEBUG, "DFS: Selecting random channel");
|
||||||
|
*secondary_channel = 0;
|
||||||
|
*vht_oper_centr_freq_seg0_idx = 0;
|
||||||
|
*vht_oper_centr_freq_seg1_idx = 0;
|
||||||
|
|
||||||
if (iface->current_mode == NULL)
|
if (iface->current_mode == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user