aboutsummaryrefslogtreecommitdiffstats
path: root/src/ap/ieee802_1x.c
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 /src/ap/ieee802_1x.c
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 'src/ap/ieee802_1x.c')
-rw-r--r--src/ap/ieee802_1x.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/ap/ieee802_1x.c b/src/ap/ieee802_1x.c
index 1810925..2287b28 100644
--- a/src/ap/ieee802_1x.c
+++ b/src/ap/ieee802_1x.c
@@ -2151,10 +2151,20 @@ int ieee802_1x_init(struct hostapd_data *hapd)
}
-void ieee802_1x_deinit(struct hostapd_data *hapd)
+void ieee802_1x_erp_flush(struct hostapd_data *hapd)
{
struct eap_server_erp_key *erp;
+ while ((erp = dl_list_first(&hapd->erp_keys, struct eap_server_erp_key,
+ list)) != NULL) {
+ dl_list_del(&erp->list);
+ bin_clear_free(erp, sizeof(*erp));
+ }
+}
+
+
+void ieee802_1x_deinit(struct hostapd_data *hapd)
+{
eloop_cancel_timeout(ieee802_1x_rekey, hapd, NULL);
if (hapd->driver != NULL &&
@@ -2164,11 +2174,7 @@ void ieee802_1x_deinit(struct hostapd_data *hapd)
eapol_auth_deinit(hapd->eapol_auth);
hapd->eapol_auth = NULL;
- while ((erp = dl_list_first(&hapd->erp_keys, struct eap_server_erp_key,
- list)) != NULL) {
- dl_list_del(&erp->list);
- bin_clear_free(erp, sizeof(*erp));
- }
+ ieee802_1x_erp_flush(hapd);
}