aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/events.c
diff options
context:
space:
mode:
authorSunil Dutt <duttus@codeaurora.org>2013-02-05 11:27:56 (GMT)
committerJouni Malinen <j@w1.fi>2013-02-05 11:27:56 (GMT)
commit3887878e536525ec7ffb8ab4c8110d01bea13308 (patch)
tree60e03f737fba15c2a02ec6b8ea6a02db15f7e1f2 /wpa_supplicant/events.c
parent283a26f35884705548039abac32c010a99e9f434 (diff)
downloadhostap-3887878e536525ec7ffb8ab4c8110d01bea13308.zip
hostap-3887878e536525ec7ffb8ab4c8110d01bea13308.tar.gz
hostap-3887878e536525ec7ffb8ab4c8110d01bea13308.tar.bz2
TDLS: Remove link, if any, on an implicit set up request
If an implicit TDLS set up request is obtained on an existing link or an to be established link, the previous link was not removed. This commit disables the existing link on a new set up request. Also, wpa_tdls_reneg() function was invoking wpa_tdls_start() on an already existing peer for the case of internal setup, which is incorrect. Thus the invocation of wpa_tdls_start() is removed in wpa_tdls_reneg() and also this function is renamed to wps_tdls_remove() as it does not renegotiation rather shall remove the link (if any) for the case of external setup. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/events.c')
-rw-r--r--wpa_supplicant/events.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index 13b54c2..3196352 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -2157,7 +2157,11 @@ static void wpa_supplicant_event_tdls(struct wpa_supplicant *wpa_s,
return;
switch (data->tdls.oper) {
case TDLS_REQUEST_SETUP:
- wpa_tdls_start(wpa_s->wpa, data->tdls.peer);
+ wpa_tdls_remove(wpa_s->wpa, data->tdls.peer);
+ if (wpa_tdls_is_external_setup(wpa_s->wpa))
+ wpa_tdls_start(wpa_s->wpa, data->tdls.peer);
+ else
+ wpa_drv_tdls_oper(wpa_s, TDLS_SETUP, data->tdls.peer);
break;
case TDLS_REQUEST_TEARDOWN:
wpa_tdls_teardown_link(wpa_s->wpa, data->tdls.peer,