mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-01-18 10:54:03 -05:00
P2P: Set CTWindow only for P2P GO
CTWindow was set for all AP interfaces if the driver supports it and this parameter is set in wpa_supplicant configuration. This results in failing to start an AP that is not a P2P GO as this setting is rejected by the driver. Fix that by setting the CTWindow only for P2P GO interface. Signed-off-by: Avraham Stern <avraham.stern@intel.com>
This commit is contained in:
parent
1d61a8efee
commit
0aed3f5a80
@ -301,14 +301,18 @@ static int wpa_supplicant_conf_ap(struct wpa_supplicant *wpa_s,
|
|||||||
conf->beacon_int = wpa_s->conf->beacon_int;
|
conf->beacon_int = wpa_s->conf->beacon_int;
|
||||||
|
|
||||||
#ifdef CONFIG_P2P
|
#ifdef CONFIG_P2P
|
||||||
|
if (ssid->mode == WPAS_MODE_P2P_GO ||
|
||||||
|
ssid->mode == WPAS_MODE_P2P_GROUP_FORMATION) {
|
||||||
if (wpa_s->conf->p2p_go_ctwindow > conf->beacon_int) {
|
if (wpa_s->conf->p2p_go_ctwindow > conf->beacon_int) {
|
||||||
wpa_printf(MSG_INFO,
|
wpa_printf(MSG_INFO,
|
||||||
"CTWindow (%d) is bigger than beacon interval (%d) - avoid configuring it",
|
"CTWindow (%d) is bigger than beacon interval (%d) - avoid configuring it",
|
||||||
wpa_s->conf->p2p_go_ctwindow, conf->beacon_int);
|
wpa_s->conf->p2p_go_ctwindow,
|
||||||
|
conf->beacon_int);
|
||||||
conf->p2p_go_ctwindow = 0;
|
conf->p2p_go_ctwindow = 0;
|
||||||
} else {
|
} else {
|
||||||
conf->p2p_go_ctwindow = wpa_s->conf->p2p_go_ctwindow;
|
conf->p2p_go_ctwindow = wpa_s->conf->p2p_go_ctwindow;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#endif /* CONFIG_P2P */
|
#endif /* CONFIG_P2P */
|
||||||
|
|
||||||
if ((bss->wpa & 2) && bss->rsn_pairwise == 0)
|
if ((bss->wpa & 2) && bss->rsn_pairwise == 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user