[PATCH v2] wpa_auth: Reconfigure group rekey timer upon wpa_reconfig
Nikita Chernikov
nchernikov at maxlinear.com
Tue Mar 4 06:49:45 PST 2025
>From 33be851ea54ce836c07cb4b2117b5a61da9ebaee Mon Sep 17 00:00:00 2001
From: Nikita Chernikov <nchernikov at maxlinear.com>
Date: Fri, 14 Feb 2025 18:04:28 +0530
Subject: [PATCH v2] wpa_auth: Reconfigure group rekey timer upon wpa_reconfig
To: hostap at lists.infradead.org
During BSS reload (either via ctrl iface or SIGHUP) need to reconfigure the
group rekey timer, as it might change for specific BSS via the new config file.
If not reconfigured, the previous running timer will need to expire in order to apply
the new group rekey timeout.
Fix typo in eloop_cancel_timeout of previously suggested and listed patch
Signed-off-by: Nikita Chernikov <nchernikov at maxlinear.com>
---
src/ap/wpa_auth.c | 14 ++++++++++++++
1 files changed, 14 insertions(+)
diff --git a/src/ap/wpa_auth.c b/src/ap/wpa_auth.c
index ffb88a03f..7a39a7b34 100644
--- a/src/ap/wpa_auth.c
+++ b/src/ap/wpa_auth.c
@@ -652,6 +652,18 @@ static void wpa_auth_pmksa_free_cb(struct rsn_pmksa_cache_entry *entry,
wpa_auth_for_each_sta(wpa_auth, wpa_auth_pmksa_clear_cb, entry);
}
+static void wpa_reconfig_group_rekey_timer(struct wpa_authenticator *wpa_auth)
+{
+ if (!wpa_auth)
+ return;
+
+ eloop_cancel_timeout(wpa_rekey_gtk, wpa_auth, NULL);
+
+ if (wpa_auth->conf.wpa_group_rekey) {
+ eloop_register_timeout(wpa_auth->conf.wpa_group_rekey,
+ 0, wpa_rekey_gtk, wpa_auth, NULL);
+ }
+}
static int wpa_group_init_gmk_and_counter(struct wpa_authenticator *wpa_auth,
struct wpa_group *group)
@@ -990,6 +1002,8 @@ int wpa_reconfig(struct wpa_authenticator *wpa_auth,
group->GInit = false;
wpa_group_sm_step(wpa_auth, group);
+ wpa_reconfig_group_rekey_timer(wpa_auth);
+
return 0;
}
--
2.17.1
More information about the Hostap
mailing list