]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Set GTK rekey offload information after initial group key handshake
authorSunil Dutt <c_duttus@qti.qualcomm.com>
Wed, 30 Oct 2013 09:41:40 +0000 (11:41 +0200)
committerJouni Malinen <j@w1.fi>
Wed, 30 Oct 2013 09:41:40 +0000 (11:41 +0200)
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 <jouni@qca.qualcomm.com>

src/rsn_supp/wpa.c

index 292255c18c6adfbbe612d4b4e888304e4725fff5..d4f86e6f0064a171522f484c3e46fd8abdac61e6 100644 (file)
@@ -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: