From: Arik Nemtsov Date: Tue, 10 Jun 2014 18:19:10 +0000 (+0300) Subject: TDLS: Do not bail when failing to process IEs in Discovery Request X-Git-Tag: hostap_2_3~265 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bed7eb68080dd36cb965748b55a025ef9346ed18;p=thirdparty%2Fhostap.git TDLS: Do not bail when failing to process IEs in Discovery Request Some APs (Cisco) may tack on a weird IE to the end of a TDLS Discovery Request packet. This needn't fail the response, since the required IEs are verified separately. Signed-off-by: Arik Nemtsov --- diff --git a/src/rsn_supp/tdls.c b/src/rsn_supp/tdls.c index 12bb059c2..652e52c66 100644 --- a/src/rsn_supp/tdls.c +++ b/src/rsn_supp/tdls.c @@ -1378,10 +1378,17 @@ 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; + &kde) < 0) { + wpa_printf(MSG_DEBUG, + "TDLS: Failed to parse IEs in Discovery Request - ignore as an interop workaround"); + } if (!kde.lnkid) { wpa_printf(MSG_DEBUG, "TDLS: Link ID not found in Discovery "