diff options
author | Michal Kazior <michal@plume.com> | 2019-01-16 12:35:20 (GMT) |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2019-01-26 15:52:04 (GMT) |
commit | 83c8608132f5e4b756aaac2df6ab06f6776f6642 (patch) | |
tree | d2baf31a77499c33449d4c18ed3d2eef456c899d /hostapd/hostapd_cli.c | |
parent | ec5c39a5574d4fbee983ae659ea0834bf48ea14d (diff) | |
download | hostap-83c8608132f5e4b756aaac2df6ab06f6776f6642.zip hostap-83c8608132f5e4b756aaac2df6ab06f6776f6642.tar.gz hostap-83c8608132f5e4b756aaac2df6ab06f6776f6642.tar.bz2 |
AP: Add wpa_psk_file reloading in runtime
The wpa_psk_file can now be modified and hostapd can be told to re-read
it with the control interface RELOAD_WPA_PSK command:
$ hostapd_cli reload_wpa_psk
It must be noted special care must be taken if WPS is configured
(wps_state=2, eap_server=1) because WPS appends PMKs to the
wpa_psk_file.
Signed-off-by: Michal Kazior <michal@plume.com>
Diffstat (limited to 'hostapd/hostapd_cli.c')
-rw-r--r-- | hostapd/hostapd_cli.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/hostapd/hostapd_cli.c b/hostapd/hostapd_cli.c index 3339924..23c592a 100644 --- a/hostapd/hostapd_cli.c +++ b/hostapd/hostapd_cli.c @@ -1494,6 +1494,13 @@ static int hostapd_cli_cmd_req_beacon(struct wpa_ctrl *ctrl, int argc, } +static int hostapd_cli_cmd_reload_wpa_psk(struct wpa_ctrl *ctrl, int argc, + char *argv[]) +{ + return wpa_ctrl_command(ctrl, "RELOAD_WPA_PSK"); +} + + struct hostapd_cli_cmd { const char *cmd; int (*handler)(struct wpa_ctrl *ctrl, int argc, char *argv[]); @@ -1669,6 +1676,8 @@ static const struct hostapd_cli_cmd hostapd_cli_commands[] = { "<addr> = poll a STA to check connectivity with a QoS null frame" }, { "req_beacon", hostapd_cli_cmd_req_beacon, NULL, "<addr> [req_mode=] <measurement request hexdump> = send a Beacon report request to a station" }, + { "reload_wpa_psk", hostapd_cli_cmd_reload_wpa_psk, NULL, + "= reload wpa_psk_file only" }, { NULL, NULL, NULL, NULL } }; |