From c03e2113b6a3eca097fba2a5a947dcec8c0bd168 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Tue, 26 Feb 2013 18:02:51 +0200 Subject: [PATCH] P2P: Do not start new GO Neg on Probe Req when waiting for Confirm If we have already sent out GO Negotiation Response and are waiting for the peer to reply with GO Negotiation Confirm, there is no point in re-starting GO Negotiation based on Probe Request frame from the peer. Doing that would just result in confusing GO Negotiation exchange with multiple sessions running at the same time. Signed-hostap: Jouni Malinen --- src/p2p/p2p.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c index 4a4bc9e63..6c65f93be 100644 --- a/src/p2p/p2p.c +++ b/src/p2p/p2p.c @@ -2166,7 +2166,8 @@ p2p_probe_req_rx(struct p2p_data *p2p, const u8 *addr, const u8 *dst, if ((p2p->state == P2P_CONNECT || p2p->state == P2P_CONNECT_LISTEN) && p2p->go_neg_peer && os_memcmp(addr, p2p->go_neg_peer->info.p2p_device_addr, ETH_ALEN) - == 0) { + == 0 && + !(p2p->go_neg_peer->flags & P2P_DEV_WAIT_GO_NEG_CONFIRM)) { /* Received a Probe Request from GO Negotiation peer */ wpa_msg(p2p->cfg->msg_ctx, MSG_DEBUG, "P2P: Found GO Negotiation peer - try to start GO "