File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -257,17 +257,19 @@ void ws_pae_auth_start(protocol_interface_info_entry_t *interface_ptr)
257
257
return ;
258
258
}
259
259
260
+ // Checks if there is predefined active key
260
261
int8_t index = sec_prot_keys_gtk_status_active_get (pae_auth -> gtks );
261
- if (index >= 0 ) {
262
- // If there is predefined active key inserts it
263
- ws_pae_auth_network_keys_from_gtks_set (pae_auth );
264
- } else {
265
- // Gets a new key
262
+ if (index < 0 ) {
263
+ // If there is no key, inserts a new one
266
264
ws_pae_auth_gtk_key_insert (pae_auth );
267
265
index = sec_prot_keys_gtk_install_order_first_index_get (pae_auth -> gtks );
268
266
ws_pae_auth_active_gtk_set (pae_auth , index );
269
267
}
270
268
269
+ // Inserts keys and updates GTK hash on stack
270
+ ws_pae_auth_network_keys_from_gtks_set (pae_auth );
271
+
272
+ // Sets active key index
271
273
ws_pae_auth_network_key_index_set (pae_auth , index );
272
274
}
273
275
You can’t perform that action at this time.
0 commit comments