TDLS: Fix concurrent initialization test code

Must not use data from peer TDLS Setup Request if the concurrent
initialization from us is supposed to be the one that gets completed.
This commit is contained in:
Jouni Malinen 2011-10-27 23:12:08 +03:00 committed by Jouni Malinen
parent ca03378b27
commit da30c93ab1

View file

@ -1553,6 +1553,19 @@ skip_rsn:
}
}
#ifdef CONFIG_TDLS_TESTING
if (tdls_testing & TDLS_TESTING_CONCURRENT_INIT) {
if (os_memcmp(sm->own_addr, peer->addr, ETH_ALEN) < 0) {
/*
* The request frame from us is going to win, so do not
* replace information based on this request frame from
* the peer.
*/
goto skip_rsn_check;
}
}
#endif /* CONFIG_TDLS_TESTING */
peer->initiator = 0; /* Need to check */
peer->dtoken = dtoken;