wlantest: Recognize SAE case for moving from State 1 to 2
Update STA state tracking for SAE authentication as well as the previous covered Open System algorithm. Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
This commit is contained in:
parent
ac6baf0bcd
commit
5d5c2cb2be
1 changed files with 6 additions and 2 deletions
|
@ -312,12 +312,14 @@ static void rx_mgmt_auth(struct wlantest *wt, const u8 *data, size_t len)
|
||||||
struct wlantest_bss *bss;
|
struct wlantest_bss *bss;
|
||||||
struct wlantest_sta *sta;
|
struct wlantest_sta *sta;
|
||||||
u16 alg, trans, status;
|
u16 alg, trans, status;
|
||||||
|
bool from_ap;
|
||||||
|
|
||||||
mgmt = (const struct ieee80211_mgmt *) data;
|
mgmt = (const struct ieee80211_mgmt *) data;
|
||||||
bss = bss_get(wt, mgmt->bssid);
|
bss = bss_get(wt, mgmt->bssid);
|
||||||
if (bss == NULL)
|
if (bss == NULL)
|
||||||
return;
|
return;
|
||||||
if (os_memcmp(mgmt->sa, mgmt->bssid, ETH_ALEN) == 0)
|
from_ap = os_memcmp(mgmt->sa, mgmt->bssid, ETH_ALEN) == 0;
|
||||||
|
if (from_ap)
|
||||||
sta = sta_get(bss, mgmt->da);
|
sta = sta_get(bss, mgmt->da);
|
||||||
else
|
else
|
||||||
sta = sta_get(bss, mgmt->sa);
|
sta = sta_get(bss, mgmt->sa);
|
||||||
|
@ -339,7 +341,9 @@ static void rx_mgmt_auth(struct wlantest *wt, const u8 *data, size_t len)
|
||||||
" (alg=%u trans=%u status=%u)",
|
" (alg=%u trans=%u status=%u)",
|
||||||
MAC2STR(mgmt->sa), MAC2STR(mgmt->da), alg, trans, status);
|
MAC2STR(mgmt->sa), MAC2STR(mgmt->da), alg, trans, status);
|
||||||
|
|
||||||
if (alg == 0 && trans == 2 && status == 0) {
|
if (status == WLAN_STATUS_SUCCESS &&
|
||||||
|
((alg == WLAN_AUTH_OPEN && trans == 2) ||
|
||||||
|
(alg == WLAN_AUTH_SAE && trans == 2 && from_ap))) {
|
||||||
if (sta->state == STATE1) {
|
if (sta->state == STATE1) {
|
||||||
add_note(wt, MSG_DEBUG, "STA " MACSTR
|
add_note(wt, MSG_DEBUG, "STA " MACSTR
|
||||||
" moved to State 2 with " MACSTR,
|
" moved to State 2 with " MACSTR,
|
||||||
|
|
Loading…
Reference in a new issue