[PATCH] TDLS: disable links during AP deauth in external flow

Ilan Peer ilan.peer
Wed Apr 23 22:45:37 PDT 2014


From: Arik Nemtsov <arik at wizery.com>

When de-authenticating from the AP, disable each TDLS link after
sending the teardown packet. Postpone the reset of the peer state data
until after the link disable request.

Signed-off-by: Arik Nemtsov <arikx.nemtsov at intel.com>
---
 src/rsn_supp/tdls.c |    7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/rsn_supp/tdls.c b/src/rsn_supp/tdls.c
index ea29369..67a176e 100644
--- a/src/rsn_supp/tdls.c
+++ b/src/rsn_supp/tdls.c
@@ -759,9 +759,6 @@ skip_ies:
 			  reason_code, 0, rbuf, pos - rbuf);
 	os_free(rbuf);
 
-	/* clear the Peerkey statemachine */
-	wpa_tdls_peer_free(sm, peer);
-
 	return 0;
 }
 
@@ -2588,8 +2585,8 @@ void wpa_tdls_teardown_peers(struct wpa_sm *sm)
 		wpa_printf(MSG_DEBUG, "TDLS: Tear down peer " MACSTR,
 			   MAC2STR(peer->addr));
 		if (sm->tdls_external_setup)
-			wpa_tdls_send_teardown(sm, peer->addr,
-					       WLAN_REASON_DEAUTH_LEAVING);
+			wpa_tdls_do_teardown(sm, peer,
+					     WLAN_REASON_DEAUTH_LEAVING);
 		else
 			wpa_sm_tdls_oper(sm, TDLS_TEARDOWN, peer->addr);
 
-- 
1.7.10.4




More information about the Hostap mailing list