mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-28 18:28:23 -05:00
P2P: Validate GO operating channel on channel list changes
On receiving CHANNEL_LIST_CHANGED event from driver, verify that local GO (if any) is operating in valid frequency. If not, we should remove the group and reform on valid frequency. Indicate this similarly to the avoid-frequency notification (i.e., a control interface message for upper layers to react to this for now; potentially CSA later). Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
fb2ac53df1
commit
7b42862ac8
@ -6413,6 +6413,7 @@ void wpas_p2p_pbc_overlap_cb(void *eloop_ctx, void *timeout_ctx)
|
|||||||
void wpas_p2p_update_channel_list(struct wpa_supplicant *wpa_s)
|
void wpas_p2p_update_channel_list(struct wpa_supplicant *wpa_s)
|
||||||
{
|
{
|
||||||
struct p2p_channels chan, cli_chan;
|
struct p2p_channels chan, cli_chan;
|
||||||
|
struct wpa_supplicant *ifs;
|
||||||
|
|
||||||
if (wpa_s->global == NULL || wpa_s->global->p2p == NULL)
|
if (wpa_s->global == NULL || wpa_s->global->p2p == NULL)
|
||||||
return;
|
return;
|
||||||
@ -6426,6 +6427,28 @@ void wpas_p2p_update_channel_list(struct wpa_supplicant *wpa_s)
|
|||||||
}
|
}
|
||||||
|
|
||||||
p2p_update_channel_list(wpa_s->global->p2p, &chan, &cli_chan);
|
p2p_update_channel_list(wpa_s->global->p2p, &chan, &cli_chan);
|
||||||
|
|
||||||
|
for (ifs = wpa_s->global->ifaces; ifs; ifs = ifs->next) {
|
||||||
|
int freq;
|
||||||
|
if (!ifs->current_ssid ||
|
||||||
|
!ifs->current_ssid->p2p_group ||
|
||||||
|
(ifs->current_ssid->mode != WPAS_MODE_P2P_GO &&
|
||||||
|
ifs->current_ssid->mode != WPAS_MODE_P2P_GROUP_FORMATION))
|
||||||
|
continue;
|
||||||
|
freq = ifs->current_ssid->frequency;
|
||||||
|
if (freq_included(&chan, freq)) {
|
||||||
|
wpa_dbg(ifs, MSG_DEBUG,
|
||||||
|
"P2P GO operating frequency %d MHz in valid range",
|
||||||
|
freq);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
wpa_dbg(ifs, MSG_DEBUG,
|
||||||
|
"P2P GO operating in invalid frequency %d MHz", freq);
|
||||||
|
/* TODO: Consider using CSA or removing the group within
|
||||||
|
* wpa_supplicant */
|
||||||
|
wpa_msg(ifs, MSG_INFO, P2P_EVENT_REMOVE_AND_REFORM_GROUP);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user