From: Jouni Malinen Date: Tue, 29 Jun 2010 17:45:39 +0000 (-0700) Subject: P2P: Add Group Info attr into Probe Response in GO without clients X-Git-Tag: hostap-1-bp~1110 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=55a625799f514f355fee2163a81e1e69434c1a89;p=thirdparty%2Fhostap.git P2P: Add Group Info attr into Probe Response in GO without clients While there is no real value in this, the spec seems to mark this attribute as mandatory from GO, so better included it regardless of whether we have clients or not (the attribute is empty in case no clients are connected). --- diff --git a/src/p2p/p2p_group.c b/src/p2p/p2p_group.c index ab0f9a1f7..dd938d6ed 100644 --- a/src/p2p/p2p_group.c +++ b/src/p2p/p2p_group.c @@ -198,16 +198,14 @@ static struct wpabuf * p2p_group_build_probe_resp_ie(struct p2p_group *group) /* P2P Device Info */ p2p_buf_add_device_info(ie, group->p2p, NULL); - if (group->members) { - /* P2P Group Info */ - group_info = wpabuf_put(ie, 0); - wpabuf_put_u8(ie, P2P_ATTR_GROUP_INFO); - wpabuf_put_le16(ie, 0); /* Length to be filled */ - for (m = group->members; m; m = m->next) - p2p_client_info(ie, m); - WPA_PUT_LE16(group_info + 1, - (u8 *) wpabuf_put(ie, 0) - group_info - 3); - } + /* P2P Group Info */ + group_info = wpabuf_put(ie, 0); + wpabuf_put_u8(ie, P2P_ATTR_GROUP_INFO); + wpabuf_put_le16(ie, 0); /* Length to be filled */ + for (m = group->members; m; m = m->next) + p2p_client_info(ie, m); + WPA_PUT_LE16(group_info + 1, + (u8 *) wpabuf_put(ie, 0) - group_info - 3); p2p_buf_update_ie_hdr(ie, len); return ie;