From 392e68e81f186b0f05beb14ac2128b9d6e76fe92 Mon Sep 17 00:00:00 2001 From: Sunil Dutt Date: Wed, 30 Oct 2013 11:41:40 +0200 Subject: [PATCH] Set GTK rekey offload information after initial group key handshake The GTK rekey offload information was sent to the driver immediately after the 4-way handshake which ended up being before the initial group key exchange in the case of WPA (v1). This could result in even that initial GTK handshake being offloaded and wpa_supplicant being left in WPA_GROUP_HANDSHAKE state. Fix this by postponing the operation to happen only after the full set of initial EAPOL-Key exchanges have been completed (i.e., in the existing location for WPA2 and a after the group key handshake for WPA). Signed-hostap: Jouni Malinen --- src/rsn_supp/wpa.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/rsn_supp/wpa.c b/src/rsn_supp/wpa.c index 292255c..d4f86e6 100644 --- a/src/rsn_supp/wpa.c +++ b/src/rsn_supp/wpa.c @@ -1126,7 +1126,8 @@ static void wpa_supplicant_process_3_of_4(struct wpa_sm *sm, goto failed; } - wpa_sm_set_rekey_offload(sm); + if (ie.gtk) + wpa_sm_set_rekey_offload(sm); return; @@ -1347,13 +1348,14 @@ static void wpa_supplicant_process_1_of_2(struct wpa_sm *sm, MAC2STR(sm->bssid), wpa_cipher_txt(sm->group_cipher)); wpa_sm_cancel_auth_timeout(sm); wpa_sm_set_state(sm, WPA_COMPLETED); - - wpa_sm_set_rekey_offload(sm); } else { wpa_supplicant_key_neg_complete(sm, sm->bssid, key_info & WPA_KEY_INFO_SECURE); } + + wpa_sm_set_rekey_offload(sm); + return; failed: -- 2.1.4