aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2014-12-14 11:31:12 (GMT)
committerJouni Malinen <j@w1.fi>2014-12-14 13:47:04 (GMT)
commit2c6411edd052117b221c36775b53088f7d5d707a (patch)
tree405336b9cff3dd7d3847966cd036bfc3f08b87d7 /hostapd
parent777bbe7a3c7f9f93e03b8302c2169b5041013ad5 (diff)
downloadhostap-2c6411edd052117b221c36775b53088f7d5d707a.zip
hostap-2c6411edd052117b221c36775b53088f7d5d707a.tar.gz
hostap-2c6411edd052117b221c36775b53088f7d5d707a.tar.bz2
ERP: Add ERP_FLUSH for hostapd
This can be used to drop any pending ERP key from both the internal AP authentication server and RADIUS server use of hostapd. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'hostapd')
-rw-r--r--hostapd/ctrl_iface.c6
-rw-r--r--hostapd/hostapd_cli.c8
2 files changed, 13 insertions, 1 deletions
diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
index 4ed3dec..52e7a43 100644
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
@@ -2019,7 +2019,11 @@ static void hostapd_ctrl_iface_receive(int sock, void *eloop_ctx,
} else if (os_strncmp(buf, "VENDOR ", 7) == 0) {
reply_len = hostapd_ctrl_iface_vendor(hapd, buf + 7, reply,
reply_size);
-
+ } else if (os_strcmp(buf, "ERP_FLUSH") == 0) {
+ ieee802_1x_erp_flush(hapd);
+#ifdef RADIUS_SERVER
+ radius_server_erp_flush(hapd->radius_srv);
+#endif /* RADIUS_SERVER */
} else {
os_memcpy(reply, "UNKNOWN COMMAND\n", 16);
reply_len = 16;
diff --git a/hostapd/hostapd_cli.c b/hostapd/hostapd_cli.c
index 7faa324..7009184 100644
--- a/hostapd/hostapd_cli.c
+++ b/hostapd/hostapd_cli.c
@@ -1002,6 +1002,13 @@ static int hostapd_cli_cmd_vendor(struct wpa_ctrl *ctrl, int argc, char *argv[])
}
+static int hostapd_cli_cmd_erp_flush(struct wpa_ctrl *ctrl, int argc,
+ char *argv[])
+{
+ return wpa_ctrl_command(ctrl, "ERP_FLUSH");
+}
+
+
struct hostapd_cli_cmd {
const char *cmd;
int (*handler)(struct wpa_ctrl *ctrl, int argc, char *argv[]);
@@ -1055,6 +1062,7 @@ static struct hostapd_cli_cmd hostapd_cli_commands[] = {
{ "enable", hostapd_cli_cmd_enable },
{ "reload", hostapd_cli_cmd_reload },
{ "disable", hostapd_cli_cmd_disable },
+ { "erp_flush", hostapd_cli_cmd_erp_flush },
{ NULL, NULL }
};