aboutsummaryrefslogtreecommitdiffstats
path: root/src/ap/ieee802_1x.c
diff options
context:
space:
mode:
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);
}