diff options
author | Jouni Malinen <jouni@qca.qualcomm.com> | 2011-09-20 20:13:18 +0300 |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2011-09-20 20:13:18 +0300 |
commit | 6908d459e2299df047b80966e7b14582bba2e9f3 (patch) | |
tree | b32d53a10f5db65b99c900fec409bf3d81f2e22b /wlantest | |
parent | 20f5a4c24c69fbbae0362e073369254db75c7f0d (diff) | |
download | external_wpa_supplicant_8_ti-6908d459e2299df047b80966e7b14582bba2e9f3.zip external_wpa_supplicant_8_ti-6908d459e2299df047b80966e7b14582bba2e9f3.tar.gz external_wpa_supplicant_8_ti-6908d459e2299df047b80966e7b14582bba2e9f3.tar.bz2 |
wlantest: Verify that comeback assoc resp includes correct type
The Timeout Interval element needs to use Association Comeback time
for the case when (Re)Association Response frame uses Status Code 30.
Verify this before incrementing the (re)assocresp_comeback counters.
Diffstat (limited to 'wlantest')
-rw-r--r-- | wlantest/rx_mgmt.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/wlantest/rx_mgmt.c b/wlantest/rx_mgmt.c index 6772376..6f7fd40 100644 --- a/wlantest/rx_mgmt.c +++ b/wlantest/rx_mgmt.c @@ -336,10 +336,13 @@ static void rx_mgmt_assoc_resp(struct wlantest *wt, const u8 *data, size_t len) wpa_printf(MSG_INFO, "Failed to parse IEs in " "AssocResp from " MACSTR, MAC2STR(mgmt->sa)); - } else if (elems.timeout_int == 0 || - elems.timeout_int_len != 5) { - wpa_printf(MSG_INFO, "No valid Timeout Interval IE in " - "AssocResp (status=30) from " MACSTR, + } else if (elems.timeout_int == NULL || + elems.timeout_int_len != 5 || + elems.timeout_int[0] != + WLAN_TIMEOUT_ASSOC_COMEBACK) { + wpa_printf(MSG_INFO, "No valid Timeout Interval IE " + "with Assoc Comeback time in AssocResp " + "(status=30) from " MACSTR, MAC2STR(mgmt->sa)); } else { sta->counters[ @@ -465,10 +468,13 @@ static void rx_mgmt_reassoc_resp(struct wlantest *wt, const u8 *data, wpa_printf(MSG_INFO, "Failed to parse IEs in " "ReassocResp from " MACSTR, MAC2STR(mgmt->sa)); - } else if (elems.timeout_int == 0 || - elems.timeout_int_len != 5) { - wpa_printf(MSG_INFO, "No valid Timeout Interval IE in " - "ReassocResp (status=30) from " MACSTR, + } else if (elems.timeout_int == NULL || + elems.timeout_int_len != 5 || + elems.timeout_int[0] != + WLAN_TIMEOUT_ASSOC_COMEBACK) { + wpa_printf(MSG_INFO, "No valid Timeout Interval IE " + "with Assoc Comeback time in ReassocResp " + "(status=30) from " MACSTR, MAC2STR(mgmt->sa)); } else { sta->counters[ |