]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
TDLS: Add testing capability to send TPK M2 twice
authorJouni Malinen <jouni@qca.qualcomm.com>
Mon, 20 Nov 2017 22:48:52 +0000 (00:48 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 20 Nov 2017 22:48:52 +0000 (00:48 +0200)
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
src/rsn_supp/tdls.c

index 5e350edb34fcbcf9d9cc40eea5460052e349fa6f..14b346a6ed9b562ed5b874c4964474f4fd66e11f 100644 (file)
@@ -35,6 +35,7 @@
 #define TDLS_TESTING_DECLINE_RESP BIT(9)
 #define TDLS_TESTING_IGNORE_AP_PROHIBIT BIT(10)
 #define TDLS_TESTING_WRONG_MIC BIT(11)
+#define TDLS_TESTING_DOUBLE_TPK_M2 BIT(12)
 unsigned int tdls_testing = 0;
 #endif /* CONFIG_TDLS_TESTING */
 
@@ -2124,6 +2125,13 @@ skip_add_peer:
                goto error;
        }
 
+#ifdef CONFIG_TDLS_TESTING
+       if (tdls_testing & TDLS_TESTING_DOUBLE_TPK_M2) {
+               wpa_printf(MSG_INFO, "TDLS: Testing - Send another TPK M2");
+               wpa_tdls_send_tpk_m2(sm, src_addr, dtoken, lnkid, peer);
+       }
+#endif /* CONFIG_TDLS_TESTING */
+
        return 0;
 
 error: