blob: 01a134ef7d5dfdf863111121f2ec5613dee16905 [file] [log] [blame]
developer3a044d22023-06-13 16:03:57 +08001From 0aaec4ebc72e40da76a279d817763f4655f45d21 Mon Sep 17 00:00:00 2001
2From: mtk23510 <rudra.shahi@mediatek.com>
3Date: Fri, 26 May 2023 14:52:35 +0800
4Subject: [PATCH] hostapd: mtk: 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 02f8546..d529bbc 100644
13--- a/hostapd/hostapd_cli.c
14+++ b/hostapd/hostapd_cli.c
15@@ -1256,6 +1256,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@@ -1761,6 +1770,10 @@ static const struct hostapd_cli_cmd hostapd_cli_commands[] = {
32 "= disable hostapd on current interface" },
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.18.0
44