wlantest: Check WPA/RSN IE match between AssocReq and Beacon
Note unexpected WPA/RSN IE in AssocReq and ignore them if the last Beacon/ProbeResp from the AP is not advertising support for WPA/RSN.
This commit is contained in:
parent
cbcf92b42f
commit
2caf69247b
1 changed files with 16 additions and 0 deletions
|
@ -72,6 +72,22 @@ void sta_update_assoc(struct wlantest_sta *sta, struct ieee802_11_elems *elems)
|
||||||
struct wpa_ie_data data;
|
struct wpa_ie_data data;
|
||||||
struct wlantest_bss *bss = sta->bss;
|
struct wlantest_bss *bss = sta->bss;
|
||||||
|
|
||||||
|
if (elems->wpa_ie && !bss->wpaie[0]) {
|
||||||
|
wpa_printf(MSG_INFO, "WPA IE included in Association Request "
|
||||||
|
"frame from " MACSTR " even though BSS does not "
|
||||||
|
"use WPA - ignore IE",
|
||||||
|
MAC2STR(sta->addr));
|
||||||
|
elems->wpa_ie = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (elems->rsn_ie && !bss->rsnie[0]) {
|
||||||
|
wpa_printf(MSG_INFO, "RSN IE included in Association Request "
|
||||||
|
"frame from " MACSTR " even though BSS does not "
|
||||||
|
"use RSN - ignore IE",
|
||||||
|
MAC2STR(sta->addr));
|
||||||
|
elems->rsn_ie = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (elems->wpa_ie && elems->rsn_ie) {
|
if (elems->wpa_ie && elems->rsn_ie) {
|
||||||
wpa_printf(MSG_INFO, "Both WPA IE and RSN IE included in "
|
wpa_printf(MSG_INFO, "Both WPA IE and RSN IE included in "
|
||||||
"Association Request frame from " MACSTR,
|
"Association Request frame from " MACSTR,
|
||||||
|
|
Loading…
Reference in a new issue