diff options
| author | Dmitry Shmidt <dimitrysh@google.com> | 2014-06-20 10:16:40 -0700 |
|---|---|---|
| committer | Dmitry Shmidt <dimitrysh@google.com> | 2014-06-20 10:16:40 -0700 |
| commit | 0c08fdcf5231617f2340cb18e45769a8ed3a1dc4 (patch) | |
| tree | 9c2f8117654e8bcbda0814207774e31afca5941f /src/rsn_supp | |
| parent | 43cb578dfe2c492257636f6234a24178ed27789e (diff) | |
| download | android_external_wpa_supplicant_8-0c08fdcf5231617f2340cb18e45769a8ed3a1dc4.tar.gz android_external_wpa_supplicant_8-0c08fdcf5231617f2340cb18e45769a8ed3a1dc4.tar.bz2 android_external_wpa_supplicant_8-0c08fdcf5231617f2340cb18e45769a8ed3a1dc4.zip | |
Cumulative patch from commit 3302b7c29f42c532c815268bcdcd09e1dbe1840c
3302b7c Rate limit SA Query procedure initiation on unprotected disconnect
4075e2f EAP-GPSK: Clean up CSuite_List length validation (CID 62854)
2dbc959 EAP-FAST: Clean up TLV length validation (CID 62853)
35cbadb VHT: Remove useless validation code from Operating Mode Notification
bed7eb6 TDLS: Do not bail when failing to process IEs in Discovery Request
7e0f4f4 TDLS: Do not reject TPK M3 when failing to process IEs
Change-Id: I85ed050d7fce0ed8eb1959688171236d87264ff4
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Diffstat (limited to 'src/rsn_supp')
| -rw-r--r-- | src/rsn_supp/tdls.c | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/src/rsn_supp/tdls.c b/src/rsn_supp/tdls.c index 59ed2c92..652e52c6 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 " @@ -2290,9 +2297,16 @@ static int wpa_tdls_process_tpk_m3(struct wpa_sm *sm, const u8 *src_addr, pos += 2 /* status code */ + 1 /* dialog token */; ielen = len - (pos - buf); /* start of IE in buf */ + + /* + * Don't reject the message if failing to parse IEs. The IEs we need are + * explicitly checked below. Some APs piggy-back broken IEs to the end + * of a TDLS Confirm packet, which will fail the link if we don't ignore + * this error. + */ if (wpa_supplicant_parse_ies((const u8 *) pos, ielen, &kde) < 0) { - wpa_printf(MSG_INFO, "TDLS: Failed to parse KDEs in TPK M3"); - goto error; + wpa_printf(MSG_DEBUG, + "TDLS: Failed to parse KDEs in TPK M3 - ignore as an interop workaround"); } if (kde.lnkid == NULL || kde.lnkid_len < 3 * ETH_ALEN) { |
