WFD: Properly match group for WFD element in Invitation Response

The group matching should be done by comparing the P2P Interface Address
(which the group_bssid here is) to the group's BSSID and not the group
ID (which uses P2P Device Address and would have also needed the SSID).
Though, it should be noted that this case cannot really happen since a
GO in an active group would never be invited to join another group in
its GO role (i.e., if it receives an Invitation Request, it will reply
in P2P Device role). As such, this fix does not really change any
observable behavior, but anyway, it is good to keep the implementation
here consistent with the Invitation Request case.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Jouni Malinen 2012-09-05 16:39:19 +03:00 committed by Jouni Malinen
parent 0e9c66c22d
commit a05126d620

View file

@ -104,8 +104,8 @@ static struct wpabuf * p2p_build_invitation_resp(struct p2p_data *p2p,
for (i = 0; i < p2p->num_groups; i++) { for (i = 0; i < p2p->num_groups; i++) {
struct p2p_group *g = p2p->groups[i]; struct p2p_group *g = p2p->groups[i];
struct wpabuf *ie; struct wpabuf *ie;
if (!p2p_group_is_group_id_match(g, group_bssid, if (os_memcmp(p2p_group_get_interface_addr(g),
ETH_ALEN)) group_bssid, ETH_ALEN) != 0)
continue; continue;
ie = p2p_group_get_wfd_ie(g); ie = p2p_group_get_wfd_ie(g);
if (ie) { if (ie) {