diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c index a3f97196d..841f9c59c 100644 --- a/src/ap/hostapd.c +++ b/src/ap/hostapd.c @@ -78,6 +78,11 @@ int hostapd_reload_config(struct hostapd_iface *iface) "after reloading configuration"); } + if (hapd->conf->ieee802_1x || hapd->conf->wpa) + hapd->drv.set_drv_ieee8021x(hapd, hapd->conf->iface, 1); + else + hapd->drv.set_drv_ieee8021x(hapd, hapd->conf->iface, 0); + if (hapd->conf->wpa && hapd->wpa_auth == NULL) hostapd_setup_wpa(hapd); else if (hapd->conf->wpa) { @@ -106,11 +111,6 @@ int hostapd_reload_config(struct hostapd_iface *iface) /* try to continue */ } - if (hapd->conf->ieee802_1x || hapd->conf->wpa) - hapd->drv.set_drv_ieee8021x(hapd, hapd->conf->iface, 1); - else - hapd->drv.set_drv_ieee8021x(hapd, hapd->conf->iface, 0); - hostapd_config_free(oldconf); wpa_printf(MSG_DEBUG, "Reconfigured interface %s", hapd->conf->iface);