netdev: support HANDSHAKE_EVENT_REKEY_COMPLETE

In try_handshake_complete() we return early if all the keys had
been installed before (initial associations). For rekeys we can
now emit the REKEY_COMPLETE event which lets AP mode reset the
rekey timer for that station.
This commit is contained in:
James Prestwood 2023-01-11 12:15:40 -08:00 committed by Denis Kenzior
parent 70e3a43475
commit b373d1fa69
1 changed files with 7 additions and 2 deletions

View File

@ -1469,8 +1469,13 @@ static void netdev_setting_keys_failed(struct netdev_handshake_state *nhs,
static void try_handshake_complete(struct netdev_handshake_state *nhs)
{
if (nhs->ptk_installed && nhs->gtk_installed && nhs->igtk_installed &&
!nhs->complete) {
if (nhs->ptk_installed && nhs->gtk_installed && nhs->igtk_installed) {
if (nhs->complete) {
handshake_event(&nhs->super,
HANDSHAKE_EVENT_REKEY_COMPLETE);
return;
}
nhs->complete = true;
if (handshake_event(&nhs->super, HANDSHAKE_EVENT_COMPLETE))