aboutsummaryrefslogtreecommitdiffstats
path: root/src/rsn_supp
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2011-10-27 23:13:54 +0300
committerJouni Malinen <j@w1.fi>2011-10-27 23:13:54 +0300
commitc5812014933f26e050e199fc5d33f34bce7925e4 (patch)
treead4c0506ea8ae14b9fba5427b2e5cf61144232db /src/rsn_supp
parentdb9af0da709aef32c3bbcc985b21ac00c71d6548 (diff)
downloadexternal_wpa_supplicant_8_ti-c5812014933f26e050e199fc5d33f34bce7925e4.zip
external_wpa_supplicant_8_ti-c5812014933f26e050e199fc5d33f34bce7925e4.tar.gz
external_wpa_supplicant_8_ti-c5812014933f26e050e199fc5d33f34bce7925e4.tar.bz2
TDLS: Disable link on various error cases
This is needed to be able to return back to AP path on error cases.
Diffstat (limited to 'src/rsn_supp')
-rw-r--r--src/rsn_supp/tdls.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/rsn_supp/tdls.c b/src/rsn_supp/tdls.c
index f7b1dc4..f27f6af 100644
--- a/src/rsn_supp/tdls.c
+++ b/src/rsn_supp/tdls.c
@@ -1727,6 +1727,8 @@ static int wpa_tdls_process_tpk_m2(struct wpa_sm *sm, const u8 *src_addr,
if (status != WLAN_STATUS_SUCCESS) {
wpa_printf(MSG_INFO, "TDLS: Status code in TPK M2: %u",
status);
+ if (sm->tdls_external_setup)
+ wpa_sm_tdls_oper(sm, TDLS_DISABLE_LINK, src_addr);
return -1;
}
@@ -1867,6 +1869,8 @@ static int wpa_tdls_process_tpk_m2(struct wpa_sm *sm, const u8 *src_addr,
/* Discard the frame */
wpa_tdls_del_key(sm, peer);
wpa_tdls_peer_free(sm, peer);
+ if (sm->tdls_external_setup)
+ wpa_sm_tdls_oper(sm, TDLS_DISABLE_LINK, src_addr);
return -1;
}
@@ -1886,6 +1890,8 @@ skip_rsn:
error:
wpa_tdls_send_error(sm, src_addr, WLAN_TDLS_SETUP_CONFIRM, dtoken,
status);
+ if (sm->tdls_external_setup)
+ wpa_sm_tdls_oper(sm, TDLS_DISABLE_LINK, src_addr);
return -1;
}
@@ -1926,6 +1932,8 @@ static int wpa_tdls_process_tpk_m3(struct wpa_sm *sm, const u8 *src_addr,
if (status != 0) {
wpa_printf(MSG_INFO, "TDLS: Status code in TPK M3: %u",
status);
+ if (sm->tdls_external_setup)
+ wpa_sm_tdls_oper(sm, TDLS_DISABLE_LINK, src_addr);
return -1;
}
pos += 2 /* status code */ + 1 /* dialog token */;
@@ -1998,6 +2006,8 @@ static int wpa_tdls_process_tpk_m3(struct wpa_sm *sm, const u8 *src_addr,
if (lifetime != peer->lifetime) {
wpa_printf(MSG_INFO, "TDLS: Unexpected TPK lifetime %u in "
"TPK M3 (expected %u)", lifetime, peer->lifetime);
+ if (sm->tdls_external_setup)
+ wpa_sm_tdls_oper(sm, TDLS_DISABLE_LINK, src_addr);
return -1;
}