aboutsummaryrefslogtreecommitdiffstats
path: root/src/rsn_supp
diff options
context:
space:
mode:
authorPradeep Reddy POTTETI <c_ppotte@qti.qualcomm.com>2015-10-15 06:48:59 (GMT)
committerJouni Malinen <j@w1.fi>2015-10-16 08:35:19 (GMT)
commit2bd5bdcd4b1822d0fe4c88f3dd02d0a4ea5913bb (patch)
treecd68b33c5cbe6dcfe17ba5a5edd86ecc1fc14510 /src/rsn_supp
parentfaee294f1e05377e1fa1505538ee7f514a0b64dd (diff)
downloadhostap-2bd5bdcd4b1822d0fe4c88f3dd02d0a4ea5913bb.zip
hostap-2bd5bdcd4b1822d0fe4c88f3dd02d0a4ea5913bb.tar.gz
hostap-2bd5bdcd4b1822d0fe4c88f3dd02d0a4ea5913bb.tar.bz2
TDLS: On a TPK timeout, tear down the link before renewal by the initiator
On TPK lifetime expiration, tear down the direct link before renewing the link in the case of TDLS initiator processing. The expired key cannot be used anymore, so it is better to explicitly tear down the old link first. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'src/rsn_supp')
-rw-r--r--src/rsn_supp/tdls.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/rsn_supp/tdls.c b/src/rsn_supp/tdls.c
index 722c20a..2b47ff8 100644
--- a/src/rsn_supp/tdls.c
+++ b/src/rsn_supp/tdls.c
@@ -627,9 +627,15 @@ static void wpa_tdls_tpk_timeout(void *eloop_ctx, void *timeout_ctx)
*/
if (peer->initiator) {
+ u8 addr[ETH_ALEN];
+
wpa_printf(MSG_DEBUG, "TDLS: TPK lifetime expired for " MACSTR
" - try to renew", MAC2STR(peer->addr));
- wpa_tdls_start(sm, peer->addr);
+ /* cache the peer address before do_teardown */
+ os_memcpy(addr, peer->addr, ETH_ALEN);
+ wpa_tdls_do_teardown(sm, peer,
+ WLAN_REASON_TDLS_TEARDOWN_UNSPECIFIED);
+ wpa_tdls_start(sm, addr);
} else {
wpa_printf(MSG_DEBUG, "TDLS: TPK lifetime expired for " MACSTR
" - tear down", MAC2STR(peer->addr));