P2P: Complete group formation on client data connection
authorJouni Malinen <jouni@qca.qualcomm.com>
Mon, 30 Nov 2015 19:35:16 +0000 (21:35 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 30 Nov 2015 19:35:16 +0000 (21:35 +0200)
commit328f49acfe961a212e89e750516d2e2cc320765f
treecc968689d679a39ccce029b6eaf9fb813e89bb6c
parent5549bead85c296b818951fa7680c767003f8b69f
P2P: Complete group formation on client data connection

This was already the case in the GO role where the first client
connection is waited before marking
wpa_s->p2p_go_group_formation_completed = 1 and clearing
wpa_s->global->p2p_group_formation. However, in the P2P Client role,
that was done already at the completion of the WPS exchange. This can be
problematic since group formation timeout may still try to clear the
group and with wpa_s->global->p2p_group_formation == NULL, the correct
group interface may not be found.

Fix this by postponing clearing of wpa_s->global->p2p_group_formation on
the P2P Client side until the data connection has been completed and
group is declared started.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
wpa_supplicant/p2p_supplicant.c