|
|
|
@ -940,8 +940,8 @@ static int wpa_try_alt_snonce(struct wpa_state_machine *sm, u8 *data,
|
|
|
|
|
size_t pmk_len;
|
|
|
|
|
struct vlan_description vlan_desc;
|
|
|
|
|
|
|
|
|
|
os_memset(&vlan_desc, 0, sizeof(vlan_desc));
|
|
|
|
|
os_memset(&PTK, 0, sizeof(PTK));
|
|
|
|
|
os_memset(&vlan_desc, 0, sizeof(vlan_desc));
|
|
|
|
|
for (;;) {
|
|
|
|
|
if (wpa_key_mgmt_wpa_psk(sm->wpa_key_mgmt) &&
|
|
|
|
|
!wpa_key_mgmt_sae(sm->wpa_key_mgmt)) {
|
|
|
|
@ -990,7 +990,8 @@ static int wpa_try_alt_snonce(struct wpa_state_machine *sm, u8 *data,
|
|
|
|
|
"WPA: Earlier SNonce resulted in matching MIC");
|
|
|
|
|
sm->alt_snonce_valid = 0;
|
|
|
|
|
|
|
|
|
|
if (vlan_desc.notempty && wpa_key_mgmt_wpa_psk(sm->wpa_key_mgmt) &&
|
|
|
|
|
if (vlan_desc.notempty && vlan_desc.untagged
|
|
|
|
|
&& wpa_key_mgmt_wpa_psk(sm->wpa_key_mgmt) &&
|
|
|
|
|
wpa_auth_update_vlan(sm->wpa_auth, sm->addr, &vlan_desc) < 0)
|
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
|
@ -2943,13 +2944,13 @@ SM_STATE(WPA_PTK, PTKCALCNEGOTIATING)
|
|
|
|
|
struct vlan_description vlan_desc;
|
|
|
|
|
int owe_ptk_workaround = !!wpa_auth->conf.owe_ptk_workaround;
|
|
|
|
|
|
|
|
|
|
os_memset(&vlan_desc, 0, sizeof(vlan_desc));
|
|
|
|
|
|
|
|
|
|
SM_ENTRY_MA(WPA_PTK, PTKCALCNEGOTIATING, wpa_ptk);
|
|
|
|
|
sm->EAPOLKeyReceived = false;
|
|
|
|
|
sm->update_snonce = false;
|
|
|
|
|
os_memset(&PTK, 0, sizeof(PTK));
|
|
|
|
|
|
|
|
|
|
os_memset(&vlan_desc, 0, sizeof(vlan_desc));
|
|
|
|
|
|
|
|
|
|
mic_len = wpa_mic_len(sm->wpa_key_mgmt, sm->pmk_len);
|
|
|
|
|
|
|
|
|
|
/* WPA with IEEE 802.1X: use the derived PMK from EAP
|
|
|
|
@ -3090,7 +3091,6 @@ SM_STATE(WPA_PTK, PTKCALCNEGOTIATING)
|
|
|
|
|
WLAN_REASON_PREV_AUTH_NOT_VALID);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#ifdef CONFIG_OCV
|
|
|
|
|
if (wpa_auth_uses_ocv(sm)) {
|
|
|
|
|
struct wpa_channel_info ci;
|
|
|
|
@ -3194,7 +3194,8 @@ SM_STATE(WPA_PTK, PTKCALCNEGOTIATING)
|
|
|
|
|
}
|
|
|
|
|
#endif /* CONFIG_IEEE80211R_AP */
|
|
|
|
|
|
|
|
|
|
if (vlan_desc.notempty && wpa_key_mgmt_wpa_psk(sm->wpa_key_mgmt) &&
|
|
|
|
|
if (vlan_desc.notempty && vlan_desc.untagged &&
|
|
|
|
|
wpa_key_mgmt_wpa_psk(sm->wpa_key_mgmt) &&
|
|
|
|
|
wpa_auth_update_vlan(wpa_auth, sm->addr, &vlan_desc) < 0) {
|
|
|
|
|
wpa_sta_disconnect(wpa_auth, sm->addr,
|
|
|
|
|
WLAN_REASON_PREV_AUTH_NOT_VALID);
|
|
|
|
|