diff mbox

[7/7] TDLS: don't bail when failing to process IEs in discovery request

Message ID 1402424350-19261-7-git-send-email-ilan.peer@intel.com
State Accepted
Headers show

Commit Message

Peer, Ilan June 10, 2014, 6:19 p.m. UTC
From: Arik Nemtsov <arik@wizery.com>

Some APs (Cisco) will tack on a weird IE to the end of a TDLS discovery
request packet. This needn't fail the response, since the required IE
are verified separately.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
---
 src/rsn_supp/tdls.c |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/src/rsn_supp/tdls.c b/src/rsn_supp/tdls.c
index 96417d2..17280a9 100644
--- a/src/rsn_supp/tdls.c
+++ b/src/rsn_supp/tdls.c
@@ -1411,10 +1411,16 @@  wpa_tdls_process_discovery_request(struct wpa_sm *sm, const u8 *addr,
 
 	dialog_token = buf[sizeof(struct wpa_tdls_frame)];
 
+	/*
+	 * Some APs will tack on a weird IE to the end of a TDLS
+	 * discovery request packet. This needn't fail the response,
+	 * since the required IE are verified separately
+	 */
 	if (wpa_supplicant_parse_ies(buf + sizeof(struct wpa_tdls_frame) + 1,
 				     len - (sizeof(struct wpa_tdls_frame) + 1),
 				     &kde) < 0)
-		return -1;
+		wpa_printf(MSG_INFO,
+			   "TDLS: Failed to parse IEs in Discovery Req");
 
 	if (!kde.lnkid) {
 		wpa_printf(MSG_DEBUG, "TDLS: Link ID not found in Discovery "