mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-25 00:38:24 -05:00
P2P: Fix default p2p_group_idle timeout for P2P client role
Commit 0d30cc240f
forced
wpa_s->current_ssid to be cleared in wpa_supplicant_mark_disassoc()
which gets called from wpa_supplicant_event_disassoc(). This breaks the
P2P group idle mechanism for the case where p2p_group_idle is not set
(i.e., is the default 0) since wpas_p2p_group_idle_timeout() ignores the
timeout in that case if the interface is not recognized as a client
interface (which was based on wpa_s->current_ssid being set).
Fix this by making wpas_p2p_is_client() default to client case if
wpa_s->current_ssid is NULL. This is much more likely case since the P2P
GO mode operation would not really clear the pointer without explicit
request to disconnect.
Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
9f36eac6e5
commit
5fbddfdcf1
@ -4593,8 +4593,15 @@ int wpas_p2p_ext_listen(struct wpa_supplicant *wpa_s, unsigned int period,
|
|||||||
|
|
||||||
static int wpas_p2p_is_client(struct wpa_supplicant *wpa_s)
|
static int wpas_p2p_is_client(struct wpa_supplicant *wpa_s)
|
||||||
{
|
{
|
||||||
return wpa_s->current_ssid != NULL &&
|
if (wpa_s->current_ssid == NULL) {
|
||||||
wpa_s->current_ssid->p2p_group &&
|
/*
|
||||||
|
* current_ssid can be clearead when P2P client interface gets
|
||||||
|
* disconnected, so assume this interface was used as P2P
|
||||||
|
* client.
|
||||||
|
*/
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
return wpa_s->current_ssid->p2p_group &&
|
||||||
wpa_s->current_ssid->mode == WPAS_MODE_INFRA;
|
wpa_s->current_ssid->mode == WPAS_MODE_INFRA;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user