]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
ap: Reorder authsrv_init() to fix IEEE 802.1X initialization
authorChristian Lamparter <chunkeey@googlemail.com>
Sun, 17 Jan 2010 10:14:17 +0000 (12:14 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 17 Jan 2010 10:14:17 +0000 (12:14 +0200)
This patch moves the authentication server setup before
IEEE 802.1X initialization. It's because 802.1X already
needs to have a valid SSL context.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
src/ap/hostapd.c

index 158c9b606db2073a126aef21276d642ef041874b..317baf69e5f2a7842d7ab8fe547f8868bcefbe9b 100644 (file)
@@ -564,6 +564,9 @@ static int hostapd_setup_bss(struct hostapd_data *hapd, int first)
        if (hostapd_init_wps(hapd, conf))
                return -1;
 
+       if (authsrv_init(hapd) < 0)
+               return -1;
+
        if (ieee802_1x_init(hapd)) {
                wpa_printf(MSG_ERROR, "IEEE 802.1X initialization failed.");
                return -1;
@@ -597,9 +600,6 @@ static int hostapd_setup_bss(struct hostapd_data *hapd, int first)
 
        ieee802_11_set_beacon(hapd);
 
-       if (authsrv_init(hapd) < 0)
-               return -1;
-
        return 0;
 }