P2P: Set timeout when starting GO Negotiation from Probe Req RX

It was possible for the p2p_go_neg_start timeout handler to get called
when there was a pending timeout from an earlier GO Negotiation start.
This could result in that old timeout expiring too early for the newly
started GO Negotiation to complete. Avoid such issues by setting a
sufficiently long timeout here just before triggering the new GO
Negotiation.

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2014-09-27 13:44:03 +03:00
parent 7549c178ac
commit e49cabcf87

View file

@ -1831,6 +1831,11 @@ static void p2p_go_neg_start(void *eloop_ctx, void *timeout_ctx)
}
p2p->cfg->stop_listen(p2p->cfg->cb_ctx);
p2p->go_neg_peer->status = P2P_SC_SUCCESS;
/*
* Set new timeout to make sure a previously set one does not expire
* too quickly while waiting for the GO Negotiation to complete.
*/
p2p_set_timeout(p2p, 0, 500000);
p2p_connect_send(p2p, p2p->go_neg_peer);
}