]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
TDLS: Fix teardown on renegotiation
authorJouni Malinen <jouni@qca.qualcomm.com>
Thu, 27 Oct 2011 20:10:21 +0000 (23:10 +0300)
committerJouni Malinen <j@w1.fi>
Thu, 27 Oct 2011 20:10:21 +0000 (23:10 +0300)
Need to disable the link when receiving TDLS Setup Request from a
peer with which a direct link has already been set up.

src/rsn_supp/tdls.c

index 8eae9fc59a35697a2856d51c7a42457023ff86a7..415b0a9e042cbcc42f80954fff15395656a0fc28 100644 (file)
@@ -1521,7 +1521,11 @@ skip_rsn:
                         * some drivers handling the new request frame. */
                        wpa_sm_tdls_oper(sm, TDLS_DISABLE_LINK, src_addr);
 #else
-                       wpa_tdls_del_key(sm, peer);
+                       if (sm->tdls_external_setup)
+                               wpa_sm_tdls_oper(sm, TDLS_DISABLE_LINK,
+                                                src_addr);
+                       else
+                               wpa_tdls_del_key(sm, peer);
 #endif
                        wpa_tdls_peer_free(sm, peer);
                }