|
@@ -500,6 +500,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;
|
|
@@ -605,6 +606,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");
|
|
|
|
|
@@ -643,6 +650,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);
|