blob: 3e9214a5e360f2698ed92d145a8deda62f6f4bd5 [file] [log] [blame]
developer3f52c302024-04-08 14:36:46 +08001From 69271a55f60c797513cb9f925416aac13422ad7b Mon Sep 17 00:00:00 2001
2From: mtk23510 <rudra.shahi@mediatek.com>
3Date: Fri, 26 May 2023 14:52:35 +0800
4Subject: [PATCH] mtk: hostapd: Add support for gtk rekeying in hostapd cli
5
6Signed-off-by: mtk23510 <rudra.shahi@mediatek.com>
7---
8 hostapd/hostapd_cli.c | 13 +++++++++++++
9 1 file changed, 13 insertions(+)
10
11diff --git a/hostapd/hostapd_cli.c b/hostapd/hostapd_cli.c
12index a99df88..1b8a071 100644
13--- a/hostapd/hostapd_cli.c
14+++ b/hostapd/hostapd_cli.c
15@@ -1250,6 +1250,15 @@ static int hostapd_cli_cmd_update_beacon(struct wpa_ctrl *ctrl, int argc,
16 }
17
18
19+#ifdef CONFIG_TESTING_OPTIONS
20+static int hostapd_cli_cmd_rekey_gtk(struct wpa_ctrl *ctrl, int argc,
21+ char *argv[])
22+{
23+ return wpa_ctrl_command(ctrl, "REKEY_GTK");
24+}
25+#endif
26+
27+
28 static int hostapd_cli_cmd_vendor(struct wpa_ctrl *ctrl, int argc, char *argv[])
29 {
30 char cmd[256];
31@@ -1760,6 +1769,10 @@ static const struct hostapd_cli_cmd hostapd_cli_commands[] = {
32 "= disable hostapd on current BSS" },
33 { "update_beacon", hostapd_cli_cmd_update_beacon, NULL,
34 "= update Beacon frame contents\n"},
35+#ifdef CONFIG_TESTING_OPTIONS
36+ { "rekey_gtk", hostapd_cli_cmd_rekey_gtk, NULL,
37+ "= rekey gtk\n"},
38+#endif
39 { "erp_flush", hostapd_cli_cmd_erp_flush, NULL,
40 "= drop all ERP keys"},
41 { "log_level", hostapd_cli_cmd_log_level, NULL,
42--
432.25.1
44