blob: ccbe766ac1a9fe571708804d4e3118dc66dec40c [file] [log] [blame]
developer617abbd2024-04-23 14:50:01 +08001From 00c2dff4bf8d15c1c84321cef1892009aa32e9ed Mon Sep 17 00:00:00 2001
2From: mtk23510 <rudra.shahi@mediatek.com>
3Date: Fri, 26 May 2023 14:52:35 +0800
4Subject: [PATCH 060/104] mtk: hostapd: Add support for gtk rekeying in hostapd
5 cli
6
7Signed-off-by: mtk23510 <rudra.shahi@mediatek.com>
8---
9 hostapd/hostapd_cli.c | 13 +++++++++++++
10 1 file changed, 13 insertions(+)
11
12diff --git a/hostapd/hostapd_cli.c b/hostapd/hostapd_cli.c
13index 12c580455..e0b175386 100644
14--- a/hostapd/hostapd_cli.c
15+++ b/hostapd/hostapd_cli.c
16@@ -1291,6 +1291,15 @@ static int hostapd_cli_cmd_stop_ap(struct wpa_ctrl *ctrl, int argc,
17 }
18
19
20+#ifdef CONFIG_TESTING_OPTIONS
21+static int hostapd_cli_cmd_rekey_gtk(struct wpa_ctrl *ctrl, int argc,
22+ char *argv[])
23+{
24+ return wpa_ctrl_command(ctrl, "REKEY_GTK");
25+}
26+#endif
27+
28+
29 static int hostapd_cli_cmd_vendor(struct wpa_ctrl *ctrl, int argc, char *argv[])
30 {
31 char cmd[256];
32@@ -1831,6 +1840,10 @@ static const struct hostapd_cli_cmd hostapd_cli_commands[] = {
33 "= update Beacon frame contents\n"},
34 { "stop_ap", hostapd_cli_cmd_stop_ap, NULL,
35 "= stop AP\n"},
36+#ifdef CONFIG_TESTING_OPTIONS
37+ { "rekey_gtk", hostapd_cli_cmd_rekey_gtk, NULL,
38+ "= rekey gtk\n"},
39+#endif
40 { "erp_flush", hostapd_cli_cmd_erp_flush, NULL,
41 "= drop all ERP keys"},
42 { "log_level", hostapd_cli_cmd_log_level, NULL,
43--
442.39.2
45