wlantest: Use source address of TDLS Setup Confirm failure for matching
This is needed to be able to find the correct TDLS entry for the frame regardless of whether a FromDS or ToDS frame is being processed.
This commit is contained in:
parent
39c147261e
commit
6ca4da6518
1 changed files with 4 additions and 4 deletions
|
@ -326,7 +326,7 @@ static void rx_data_tdls_setup_response(struct wlantest *wt, const u8 *bssid,
|
||||||
|
|
||||||
static void rx_data_tdls_setup_confirm_failure(struct wlantest *wt,
|
static void rx_data_tdls_setup_confirm_failure(struct wlantest *wt,
|
||||||
const u8 *bssid,
|
const u8 *bssid,
|
||||||
const u8 *sta_addr,
|
const u8 *src,
|
||||||
u8 dialog_token, u16 status)
|
u8 dialog_token, u16 status)
|
||||||
{
|
{
|
||||||
struct wlantest_bss *bss;
|
struct wlantest_bss *bss;
|
||||||
|
@ -335,14 +335,14 @@ static void rx_data_tdls_setup_confirm_failure(struct wlantest *wt,
|
||||||
|
|
||||||
if (status == WLAN_STATUS_SUCCESS) {
|
if (status == WLAN_STATUS_SUCCESS) {
|
||||||
wpa_printf(MSG_INFO, "TDLS: Invalid TDLS Setup Confirm from "
|
wpa_printf(MSG_INFO, "TDLS: Invalid TDLS Setup Confirm from "
|
||||||
MACSTR, MAC2STR(sta_addr));
|
MACSTR, MAC2STR(src));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
bss = bss_find(wt, bssid);
|
bss = bss_find(wt, bssid);
|
||||||
if (!bss)
|
if (!bss)
|
||||||
return;
|
return;
|
||||||
sta = sta_find(bss, sta_addr);
|
sta = sta_find(bss, src);
|
||||||
if (!sta)
|
if (!sta)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -387,7 +387,7 @@ static void rx_data_tdls_setup_confirm(struct wlantest *wt, const u8 *bssid,
|
||||||
if (ieee802_11_parse_elems(data + 3, len - 3, &elems, 1) ==
|
if (ieee802_11_parse_elems(data + 3, len - 3, &elems, 1) ==
|
||||||
ParseFailed || elems.link_id == NULL) {
|
ParseFailed || elems.link_id == NULL) {
|
||||||
/* Need to match TDLS link based on Dialog Token */
|
/* Need to match TDLS link based on Dialog Token */
|
||||||
rx_data_tdls_setup_confirm_failure(wt, bssid, sta_addr,
|
rx_data_tdls_setup_confirm_failure(wt, bssid, src,
|
||||||
data[2], status);
|
data[2], status);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue