P2P: Remove persistent group peer if it rejects invitation

If a peer replies to persistent group invitation with status code 8
(unknown group), remove the peer from the p2p_client_list if we are the
GO or remove the persistent group if we are the P2P client since it
looks like that the peer has dropped persistent group credentials and
the provisioning step needs to be executed again.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Jouni Malinen 2013-03-15 16:31:31 +02:00 committed by Jouni Malinen
parent b277a2bebc
commit dbca75f82a
6 changed files with 83 additions and 5 deletions

View file

@ -3373,7 +3373,8 @@ static void p2p_timeout_invite_listen(struct p2p_data *p2p)
"P2P: Invitation Request retry limit reached");
if (p2p->cfg->invitation_result)
p2p->cfg->invitation_result(
p2p->cfg->cb_ctx, -1, NULL, NULL);
p2p->cfg->cb_ctx, -1, NULL, NULL,
p2p->invite_peer->info.p2p_device_addr);
}
p2p_set_state(p2p, P2P_IDLE);
}

View file

@ -730,6 +730,7 @@ struct p2p_config {
* @status: Negotiation result (Status Code)
* @bssid: P2P Group BSSID or %NULL if not received
* @channels: Available operating channels for the group
* @addr: Peer address
*
* This callback is used to indicate result of an Invitation procedure
* started with a call to p2p_invite(). The indicated status code is
@ -738,7 +739,8 @@ struct p2p_config {
* local failure in transmitting the Invitation Request.
*/
void (*invitation_result)(void *ctx, int status, const u8 *bssid,
const struct p2p_channels *channels);
const struct p2p_channels *channels,
const u8 *addr);
/**
* go_connected - Check whether we are connected to a GO

View file

@ -466,7 +466,7 @@ void p2p_process_invitation_resp(struct p2p_data *p2p, const u8 *sa,
if (p2p->cfg->invitation_result)
p2p->cfg->invitation_result(p2p->cfg->cb_ctx, *msg.status,
msg.group_bssid, channels);
msg.group_bssid, channels, sa);
p2p_parse_free(&msg);