]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
P2P: Do not include own information in the peer table
authorMarek Kwaczynski <marek.kwaczynski@tieto.com>
Sun, 18 Dec 2011 14:38:48 +0000 (16:38 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 18 Dec 2011 14:38:48 +0000 (16:38 +0200)
When the station is connected to P2P GO after calling p2p_find command
the device sees itself. It is related to lack of filtering itself from
clients connected to P2P GO.

Step by step:
1. dev1: p2p_group_add
2. dev2: p2p_connect <MAC1> pbc join
3. dev1: wps_pbc
4. dev2: p2p_find

Skip P2P client information for our own device from a GO with which
we are connected.

src/p2p/p2p.c

index 7697256d875e5b55def7e410a8c8252613a87134..79059ad5631925ab482b20bfef84d6d68594478e 100644 (file)
@@ -404,6 +404,9 @@ static int p2p_add_group_clients(struct p2p_data *p2p, const u8 *go_dev_addr,
 
        for (c = 0; c < info.num_clients; c++) {
                struct p2p_client_info *cli = &info.client[c];
+               if (os_memcmp(cli->p2p_device_addr, p2p->cfg->dev_addr,
+                             ETH_ALEN) == 0)
+                       continue; /* ignore our own entry */
                dev = p2p_get_device(p2p, cli->p2p_device_addr);
                if (dev) {
                        /*