]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Fix driver operation order in configuration reloading
authorJouni Malinen <jouni.malinen@atheros.com>
Sat, 29 May 2010 19:27:27 +0000 (22:27 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 29 May 2010 19:27:27 +0000 (22:27 +0300)
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.

src/ap/hostapd.c

index a3f97196d644a44ca213b7fd40b823b2351839f0..841f9c59c46baa848a7ffa08a7acb73b24b7714c 100644 (file)
@@ -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);