TDLS: Do not reject TPK M3 when failing to process IEs
authorArik Nemtsov <arik@wizery.com>
Tue, 10 Jun 2014 18:19:07 +0000 (21:19 +0300)
committerJouni Malinen <j@w1.fi>
Tue, 17 Jun 2014 14:05:23 +0000 (17:05 +0300)
Some APs (Cisco) may tack on a weird IE to the end of the TDLS confirm
packet, which can fail negotiation. As an interoperability workaround,
ignore IE parser failures and reject the frame only if any of the
mandatory IEs are not included.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
src/rsn_supp/tdls.c

index 59ed2c9..12bb059 100644 (file)
@@ -2290,9 +2290,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) {