aboutsummaryrefslogtreecommitdiffstats
path: root/src/p2p
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2012-06-08 18:24:08 +0300
committerJouni Malinen <j@w1.fi>2012-06-08 18:24:08 +0300
commit579a80982ad07619373876c09cdd60e2afcba5b5 (patch)
tree45cdf8364d4c7a53c017d3e0fb0c113bc443c3bd /src/p2p
parent73ccd08378fd397c242d44ee1d24a4cd6d94c3f8 (diff)
downloadexternal_wpa_supplicant_8_ti-579a80982ad07619373876c09cdd60e2afcba5b5.zip
external_wpa_supplicant_8_ti-579a80982ad07619373876c09cdd60e2afcba5b5.tar.gz
external_wpa_supplicant_8_ti-579a80982ad07619373876c09cdd60e2afcba5b5.tar.bz2
P2P: Assume GO Negotiation failed if GO Neg Conf wait times out
Stop the connection attempt if GO Negotiation Confirm is not received within 100 ms of the GO Negotiation Response getting acknowledged. Previously, we would have continued trying to connect to the peer even in this case which could result in confusing second GO Negotiation Request frame and unnecessarily long wait before indicating failure. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'src/p2p')
-rw-r--r--src/p2p/p2p.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c
index deccfc0..716454c 100644
--- a/src/p2p/p2p.c
+++ b/src/p2p/p2p.c
@@ -2950,6 +2950,14 @@ int p2p_listen_end(struct p2p_data *p2p, unsigned int freq)
static void p2p_timeout_connect(struct p2p_data *p2p)
{
p2p->cfg->send_action_done(p2p->cfg->cb_ctx);
+ if (p2p->go_neg_peer &&
+ (p2p->go_neg_peer->flags & P2P_DEV_WAIT_GO_NEG_CONFIRM)) {
+ wpa_msg(p2p->cfg->msg_ctx, MSG_DEBUG, "P2P: Wait for GO "
+ "Negotiation Confirm timed out - assume GO "
+ "Negotiation failed");
+ p2p_go_neg_failed(p2p, p2p->go_neg_peer, -1);
+ return;
+ }
p2p_set_state(p2p, P2P_CONNECT_LISTEN);
p2p_listen_in_find(p2p);
}