From: Jouni Malinen Date: Sat, 29 May 2010 19:27:27 +0000 (+0300) Subject: Fix driver operation order in configuration reloading X-Git-Tag: hostap-1-bp~1283 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=84b2f9909fa1b92b2d3eb45278799ca3ecd2392e;p=thirdparty%2Fhostap.git Fix driver operation order in configuration reloading Some of the driver wrappers need to get set_ieee8021x() call before they can configure keys. Reorder the operations in the reloading of configuration case to match with that expectation. --- 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);