]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
P2P: Do not start new GO Neg on Probe Req when waiting for Confirm
authorJouni Malinen <jouni@qca.qualcomm.com>
Tue, 26 Feb 2013 16:02:51 +0000 (18:02 +0200)
committerJouni Malinen <j@w1.fi>
Tue, 26 Feb 2013 16:02:51 +0000 (18:02 +0200)
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 <jouni@qca.qualcomm.com>

src/p2p/p2p.c

index 4a4bc9e63ba87b80d3c453896bb30854374bf696..6c65f93be4158fe422919677a7f0cd3fc716313d 100644 (file)
@@ -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 "