[PATCH] wpa_auth: Reconfigure group rekey timer upon wpa_reconfig
Nikita Chernikov
nchernikov at maxlinear.com
Mon Mar 3 07:19:37 PST 2025
From 98487e906944c456f2a784d43f47125fd9796f85 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] wpa_auth: Reconfigure group rekey timer upon wpa_reconfig
To: hostap at lists.infradead.org
During BSS reload (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.
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..671eacd2c 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_ptk, 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