]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
wlantest: Use source address of TDLS Setup Confirm failure for matching
authorJouni Malinen <jouni.malinen@atheros.com>
Mon, 14 Mar 2011 19:35:40 +0000 (21:35 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 14 Mar 2011 19:35:40 +0000 (21:35 +0200)
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.

wlantest/rx_tdls.c

index e17be70400cb3dac72f4d25e169ab2200b46f724..f2e2ac7e19634ab6f4a06939c9867bf804b502d9 100644 (file)
@@ -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,
                                               const u8 *bssid,
-                                              const u8 *sta_addr,
+                                              const u8 *src,
                                               u8 dialog_token, u16 status)
 {
        struct wlantest_bss *bss;
@@ -335,14 +335,14 @@ static void rx_data_tdls_setup_confirm_failure(struct wlantest *wt,
 
        if (status == WLAN_STATUS_SUCCESS) {
                wpa_printf(MSG_INFO, "TDLS: Invalid TDLS Setup Confirm from "
-                          MACSTR, MAC2STR(sta_addr));
+                          MACSTR, MAC2STR(src));
                return;
        }
 
        bss = bss_find(wt, bssid);
        if (!bss)
                return;
-       sta = sta_find(bss, sta_addr);
+       sta = sta_find(bss, src);
        if (!sta)
                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) ==
            ParseFailed || elems.link_id == NULL) {
                /* 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);
                return;
        }