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

Ilan Peer ilan.peer at intel.com
Tue Jun 10 14:19:10 EDT 2014


From: Arik Nemtsov <arik at 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 at intel.com>
---
 src/rsn_supp/tdls.c |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

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 "
-- 
1.7.10.4



More information about the HostAP mailing list