aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/events.c
diff options
context:
space:
mode:
authorVidyullatha Kanchanapally <vkanchan@qti.qualcomm.com>2017-03-22 10:40:05 (GMT)
committerJouni Malinen <j@w1.fi>2017-04-07 15:46:13 (GMT)
commit01ef320f192daa074c7055a44a03b6b5b811d6bd (patch)
treeaf432f806df67f82ffeead2a4ecafff531198353 /wpa_supplicant/events.c
parent5538fc930988bfc12935579b2b9930d18ffd1be8 (diff)
downloadhostap-01ef320f192daa074c7055a44a03b6b5b811d6bd.zip
hostap-01ef320f192daa074c7055a44a03b6b5b811d6bd.tar.gz
hostap-01ef320f192daa074c7055a44a03b6b5b811d6bd.tar.bz2
FILS: Update ERP next sequence number with driver offload
This keeps the internal ERP information within wpa_supplicant in sync with the driver when offloading FILS shared key authentication. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/events.c')
-rw-r--r--wpa_supplicant/events.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index 127746b..bb13d54 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -3623,11 +3623,22 @@ static void wpa_supplicant_event_assoc_auth(struct wpa_supplicant *wpa_s,
eapol_sm_notify_portValid(wpa_s->eapol, TRUE);
eapol_sm_notify_eap_success(wpa_s->eapol, TRUE);
}
- wpa_sm_set_rx_replay_ctr(wpa_s->wpa, data->assoc_info.key_replay_ctr);
wpa_sm_set_ptk_kck_kek(wpa_s->wpa, data->assoc_info.ptk_kck,
data->assoc_info.ptk_kck_len,
data->assoc_info.ptk_kek,
data->assoc_info.ptk_kek_len);
+#ifdef CONFIG_FILS
+ if (wpa_s->auth_alg == WPA_AUTH_ALG_FILS) {
+ /* Update ERP next sequence number */
+ eapol_sm_update_erp_next_seq_num(
+ wpa_s->eapol, data->assoc_info.fils_erp_next_seq_num);
+ } else {
+ wpa_sm_set_rx_replay_ctr(wpa_s->wpa,
+ data->assoc_info.key_replay_ctr);
+ }
+#else /* CONFIG_FILS */
+ wpa_sm_set_rx_replay_ctr(wpa_s->wpa, data->assoc_info.key_replay_ctr);
+#endif /* CONFIG_FILS */
}
@@ -3828,6 +3839,15 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
sme_event_assoc_reject(wpa_s, data);
else {
const u8 *bssid = data->assoc_reject.bssid;
+
+#ifdef CONFIG_FILS
+ /* Update ERP next sequence number */
+ if (wpa_s->auth_alg == WPA_AUTH_ALG_FILS)
+ eapol_sm_update_erp_next_seq_num(
+ wpa_s->eapol,
+ data->assoc_reject.fils_erp_next_seq_num);
+#endif /* CONFIG_FILS */
+
if (bssid == NULL || is_zero_ether_addr(bssid))
bssid = wpa_s->pending_bssid;
wpas_connection_failed(wpa_s, bssid);