]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
WFD: Properly match group for WFD element in Invitation Request
authorJouni Malinen <jouni@qca.qualcomm.com>
Wed, 5 Sep 2012 13:27:07 +0000 (16:27 +0300)
committerJouni Malinen <j@w1.fi>
Wed, 5 Sep 2012 13:29:44 +0000 (16:29 +0300)
When building the Invitation Request for WFD use cases, match the BSSID,
i.e., P2P Interface Address, of the group on the GO to avoid using
information from another group should the device be operating multiple
concurrent groups as GO.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

src/p2p/p2p_invitation.c

index df24c6454235dce5c8f877a554daefdb90693fb4..4745c0fa3901e17a29893ae0fae15fe0e77fbefe 100644 (file)
@@ -30,6 +30,9 @@ static struct wpabuf * p2p_build_invitation_req(struct p2p_data *p2p,
                for (i = 0; i < p2p->num_groups; i++) {
                        struct p2p_group *g = p2p->groups[i];
                        struct wpabuf *ie;
+                       if (os_memcmp(p2p_group_get_interface_addr(g),
+                                     p2p->inv_bssid, ETH_ALEN) != 0)
+                               continue;
                        ie = p2p_group_get_wfd_ie(g);
                        if (ie) {
                                wfd_ie = ie;