aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2011-01-12 11:48:55 (GMT)
committerJouni Malinen <j@w1.fi>2011-01-12 11:48:55 (GMT)
commite24cf97c0dbd08a35c83f285b3b44d6fafef4121 (patch)
treed733a3c6d0e7d022c1f9877d3d1cd63e797c941d /src
parent8d806cc2af8d7ff74162ddf5afbd3c38ee6ae0b4 (diff)
downloadhostap-e24cf97c0dbd08a35c83f285b3b44d6fafef4121.zip
hostap-e24cf97c0dbd08a35c83f285b3b44d6fafef4121.tar.gz
hostap-e24cf97c0dbd08a35c83f285b3b44d6fafef4121.tar.bz2
P2P: Check GO Neg Req retransmit limit in p2p_listen_end
This needs to be done both in the more normal location in p2p_timeout_connect_listen() (internal timeout after driver event) and in p2p_listen_end() as a workaround for the case where the driver event is delayed to happen after the internal timeout.
Diffstat (limited to 'src')
-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 1589d18..181f74c 100644
--- a/src/p2p/p2p.c
+++ b/src/p2p/p2p.c
@@ -2337,6 +2337,14 @@ int p2p_listen_end(struct p2p_data *p2p, unsigned int freq)
return 0; /* Internal timeout will trigger the next step */
if (p2p->state == P2P_CONNECT_LISTEN && p2p->go_neg_peer) {
+ if (p2p->go_neg_peer->connect_reqs >= 120) {
+ wpa_msg(p2p->cfg->msg_ctx, MSG_DEBUG,
+ "P2P: Timeout on sending GO Negotiation "
+ "Request without getting response");
+ p2p_go_neg_failed(p2p, p2p->go_neg_peer, -1);
+ return 0;
+ }
+
p2p_set_state(p2p, P2P_CONNECT);
p2p_connect_send(p2p, p2p->go_neg_peer);
return 1;