From ab0375508dadfbc9924e3aaaba10dd320a03b832 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Tue, 21 Nov 2017 00:48:52 +0200 Subject: [PATCH] TDLS: Add testing capability to send TPK M2 twice Signed-off-by: Jouni Malinen --- src/rsn_supp/tdls.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/rsn_supp/tdls.c b/src/rsn_supp/tdls.c index 5e350edb3..14b346a6e 100644 --- a/src/rsn_supp/tdls.c +++ b/src/rsn_supp/tdls.c @@ -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: