commit b373d1fa69e89286a0fbf06265921155a6b273a0
parent 70e3a43475fee883f7eb5cd933d1ddb0e2549ce5
Author: James Prestwood <prestwoj@gmail.com>
Date: Wed, 11 Jan 2023 12:15:40 -0800
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.
Diffstat:
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/netdev.c b/src/netdev.c
@@ -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))