]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
TDLS: Support both external and internal setup in disabling link
authorSunil Dutt <duttus@codeaurora.org>
Thu, 28 Mar 2013 13:05:10 +0000 (15:05 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 28 Mar 2013 13:05:10 +0000 (15:05 +0200)
Enhance TDLS Setup Request processing to support both external and
internal TDLS setup for the case where concurrent TDLS initialization
results in the TDLS Setup Request from the peer getting accepted.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

src/rsn_supp/tdls.c

index 2e33c344f36d5d93461ed1125dc49e444eaaddb3..8ceaf6c3ed7e1c9fd2f434b7a35411c3ef5c97fc 100644 (file)
@@ -1505,7 +1505,12 @@ static int wpa_tdls_process_tpk_m1(struct wpa_sm *sm, const u8 *src_addr,
                                           MACSTR " (terminate previously "
                                           "initiated negotiation",
                                           MAC2STR(src_addr));
-                               wpa_tdls_disable_link(sm, peer->addr);
+                               if (sm->tdls_external_setup)
+                                       wpa_sm_tdls_oper(sm, TDLS_DISABLE_LINK,
+                                                        src_addr);
+                               else
+                                       wpa_tdls_del_key(sm, peer);
+                               wpa_tdls_peer_free(sm, peer);
                        }
                }
        }