diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2015-11-01 08:31:15 -0800 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2015-11-01 08:31:15 -0800 |
commit | 30a76b3f403acd0a0d2451bc6f8f61863078ff1d (patch) | |
tree | 4cf5a2947b650cce39058fb528b636ee66a10025 /src | |
parent | 90b94223625165c874c870394a26d89d9b18fc7b (diff) | |
parent | 9d556d3270e7149de3876acc44fcb7af7159cd1a (diff) | |
download | android_external_wpa_supplicant_8-30a76b3f403acd0a0d2451bc6f8f61863078ff1d.tar.gz android_external_wpa_supplicant_8-30a76b3f403acd0a0d2451bc6f8f61863078ff1d.tar.bz2 android_external_wpa_supplicant_8-30a76b3f403acd0a0d2451bc6f8f61863078ff1d.zip |
Merge "Fix TK configuration to the driver in EAPOL-Key 3/4 retry case"
Diffstat (limited to 'src')
-rw-r--r-- | src/rsn_supp/wpa.c | 8 | ||||
-rw-r--r-- | src/rsn_supp/wpa_i.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/rsn_supp/wpa.c b/src/rsn_supp/wpa.c index 8adeef4a..38cbce63 100644 --- a/src/rsn_supp/wpa.c +++ b/src/rsn_supp/wpa.c @@ -489,6 +489,7 @@ static void wpa_supplicant_process_1_of_4(struct wpa_sm *sm, os_memset(buf, 0, sizeof(buf)); } sm->tptk_set = 1; + sm->tk_to_set = 1; kde = sm->assoc_wpa_ie; kde_len = sm->assoc_wpa_ie_len; @@ -594,6 +595,12 @@ static int wpa_supplicant_install_ptk(struct wpa_sm *sm, const u8 *key_rsc; u8 null_rsc[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; + if (!sm->tk_to_set) { + wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG, + "WPA: Do not re-install same PTK to the driver"); + return 0; + } + wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG, "WPA: Installing PTK to the driver"); @@ -632,6 +639,7 @@ static int wpa_supplicant_install_ptk(struct wpa_sm *sm, /* TK is not needed anymore in supplicant */ os_memset(sm->ptk.tk, 0, WPA_TK_MAX_LEN); + sm->tk_to_set = 0; if (sm->wpa_ptk_rekey) { eloop_cancel_timeout(wpa_sm_rekey_ptk, sm, NULL); diff --git a/src/rsn_supp/wpa_i.h b/src/rsn_supp/wpa_i.h index 965a9c1d..939e0a99 100644 --- a/src/rsn_supp/wpa_i.h +++ b/src/rsn_supp/wpa_i.h @@ -24,6 +24,7 @@ struct wpa_sm { struct wpa_ptk ptk, tptk; int ptk_set, tptk_set; unsigned int msg_3_of_4_ok:1; + unsigned int tk_to_set:1; u8 snonce[WPA_NONCE_LEN]; u8 anonce[WPA_NONCE_LEN]; /* ANonce from the last 1/4 msg */ int renew_snonce; |