[PATCH] updating wfd IE in provision discovery responce and in go negotioan responce

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>From df94a5945f3fbd1999a07177ab75eaf6751fc0dc Mon Sep 17 00:00:00 2001
From: Avichal Agarwal <avichal.a@xxxxxxxxxxx>
Date: Fri, 4 Mar 2016 11:38:26 +0900
Subject: [PATCH] updating wfd IE in provision discovery responce and in go
 negotioan responce

this patch will update the wfd IE at remote end
which are sent in pd responce as well as in go neg responce

Signed-off-by: Avichal Agarwal <avichal.a@xxxxxxxxxxx>
Signed-off-by: Kyeong-Chae Lim <kcya.lim@xxxxxxxxxxx>
---
 src/p2p/p2p_go_neg.c |    5 ++++-
 src/p2p/p2p_pd.c     |    4 ++++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/p2p/p2p_go_neg.c b/src/p2p/p2p_go_neg.c
index fe0096f..3736d90 100644
--- a/src/p2p/p2p_go_neg.c
+++ b/src/p2p/p2p_go_neg.c
@@ -1161,7 +1161,10 @@ void p2p_process_go_neg_resp(struct p2p_data *p2p, const u8 *sa,
 
 	if (p2p_parse(data, len, &msg))
 		return;
-
+        if (msg.wfd_subelems) {
+		wpabuf_free(dev->info.wfd_subelems);
+		dev->info.wfd_subelems = wpabuf_dup(msg.wfd_subelems);
+	}
 	if (!(dev->flags & P2P_DEV_WAIT_GO_NEG_RESPONSE)) {
 		p2p_dbg(p2p, "Was not expecting GO Negotiation Response - ignore");
 		p2p_parse_free(&msg);
diff --git a/src/p2p/p2p_pd.c b/src/p2p/p2p_pd.c
index e6535d4..6fbab99 100644
--- a/src/p2p/p2p_pd.c
+++ b/src/p2p/p2p_pd.c
@@ -1350,6 +1350,10 @@ void p2p_process_prov_disc_resp(struct p2p_data *p2p, const u8 *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) {
 		p2p_dbg(p2p, "Ignore Provision Discovery Response with unexpected Dialog Token %u (expected %u)",
-- 
1.7.9.5
_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux