From: Avichal Agarwal Date: Fri, 4 Mar 2016 02:38:26 +0000 (+0900) Subject: P2P: Update peer WFD IE from PD Response and GO Negotiation Response X-Git-Tag: hostap_2_6~757 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=35986959d9f4c40d37e9c6292946a98aa12e3223;p=thirdparty%2Fhostap.git P2P: Update peer WFD IE from PD Response and GO Negotiation Response Update the peer WFD IE information based on WFD elements received in Provision Discovery Response and GO Negotiation Response frames. Signed-off-by: Avichal Agarwal Signed-off-by: Kyeong-Chae Lim --- diff --git a/src/p2p/p2p_go_neg.c b/src/p2p/p2p_go_neg.c index fe0096f14..9f0b3f3d3 100644 --- a/src/p2p/p2p_go_neg.c +++ b/src/p2p/p2p_go_neg.c @@ -1268,6 +1268,11 @@ void p2p_process_go_neg_resp(struct p2p_data *p2p, const u8 *sa, dev->client_timeout = msg.config_timeout[1]; } + if (msg.wfd_subelems) { + wpabuf_free(dev->info.wfd_subelems); + dev->info.wfd_subelems = wpabuf_dup(msg.wfd_subelems); + } + if (!msg.operating_channel && !go) { /* * Note: P2P Client may omit Operating Channel attribute to diff --git a/src/p2p/p2p_pd.c b/src/p2p/p2p_pd.c index e6535d411..93a0535f8 100644 --- a/src/p2p/p2p_pd.c +++ b/src/p2p/p2p_pd.c @@ -1349,6 +1349,9 @@ void p2p_process_prov_disc_resp(struct p2p_data *p2p, const u8 *sa, " with no pending request", MAC2STR(sa)); p2p_parse_free(&msg); return; + } else if (msg.wfd_subelems) { + wpabuf_free(dev->info.wfd_subelems); + dev->info.wfd_subelems = wpabuf_dup(msg.wfd_subelems); } if (dev->dialog_token != msg.dialog_token) {