From: Sunil Dutt Date: Sun, 14 Jun 2015 11:55:56 +0000 (+0530) Subject: P2P: Add vendor elements into Invitation Response frames X-Git-Tag: hostap_2_5~627 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4839da4d4fd84955383b3a758a97718879b6f709;p=thirdparty%2Fhostap.git P2P: Add vendor elements into Invitation Response frames Commit 86bd36f0d5b3d359075c356d68977b4d2e7c9f71 ('Add generic mechanism for adding vendor elements into frames') introduced a mechanism to add vendor elements into various frames, but missed the addition to the Invitation Response frame. This commit addresses the same. Signed-off-by: Jouni Malinen --- diff --git a/src/p2p/p2p_invitation.c b/src/p2p/p2p_invitation.c index 44a6bbfd3..f5454f704 100644 --- a/src/p2p/p2p_invitation.c +++ b/src/p2p/p2p_invitation.c @@ -134,6 +134,9 @@ static struct wpabuf * p2p_build_invitation_resp(struct p2p_data *p2p, extra = wpabuf_len(wfd_ie); #endif /* CONFIG_WIFI_DISPLAY */ + if (p2p->vendor_elem && p2p->vendor_elem[VENDOR_ELEM_P2P_INV_RESP]) + extra += wpabuf_len(p2p->vendor_elem[VENDOR_ELEM_P2P_INV_RESP]); + buf = wpabuf_alloc(1000 + extra); if (buf == NULL) return NULL; @@ -158,6 +161,9 @@ static struct wpabuf * p2p_build_invitation_resp(struct p2p_data *p2p, wpabuf_put_buf(buf, wfd_ie); #endif /* CONFIG_WIFI_DISPLAY */ + if (p2p->vendor_elem && p2p->vendor_elem[VENDOR_ELEM_P2P_INV_RESP]) + wpabuf_put_buf(buf, p2p->vendor_elem[VENDOR_ELEM_P2P_INV_RESP]); + return buf; }