TDLS: Fix TDLS Setup Request processing in existing-peer cases
authorJouni Malinen <jouni@qca.qualcomm.com>
Thu, 28 Mar 2013 10:38:24 +0000 (12:38 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 28 Mar 2013 10:38:24 +0000 (12:38 +0200)
commit864fe3a47c192d604f99291c7a8bba464b266c28
tree159640eb09eca98e312796c3a9af9ed3b6227870
parenta9bdfd49a6b39ba51ca29e3278fa2dd0b3fe8df0
TDLS: Fix TDLS Setup Request processing in existing-peer cases

wpa_tdls_peer_free() ended up getting called after some of the
parameters from the TDLS Setup Request frame were copied into the struct
wpa_tdls_peer information. This could result in continuing with cleared
information in case the new exchange was the one that is used in
concurrent initialization case or if this is to re-negotiated an
existing TDLS link. The driver would not be provided with all the peer
capabilities correctly in such case.

Fix this by moving the existing_peer check to happen before the
information from the TDLS Setup Request frame is copied.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
src/rsn_supp/tdls.c