]> git.ipfire.org Git - thirdparty/hostap.git/commit
P2P: Fix default p2p_group_idle timeout for P2P client role
authorJouni Malinen <j@w1.fi>
Sun, 28 Oct 2012 19:37:15 +0000 (21:37 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 28 Oct 2012 19:37:15 +0000 (21:37 +0200)
commit5fbddfdcf1a7322d2929f8034576a24efb9b7334
tree39d6bd7e0026dd51232856fe35c7caf6e521d6ec
parent9f36eac6e54e3a6c8378c89dcc7daee6a3a9d314
P2P: Fix default p2p_group_idle timeout for P2P client role

Commit 0d30cc240fa36905b034dc9676f9d8da0ac18e56 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>
wpa_supplicant/p2p_supplicant.c