Update driver SSID and 802.1X/WPA parameters on configuration reload
authorJouni Malinen <jouni.malinen@atheros.com>
Fri, 27 Mar 2009 14:10:14 +0000 (16:10 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 27 Mar 2009 14:10:14 +0000 (16:10 +0200)
This is needed for WPS AP reconfiguration with driver wrappers that do
not use hostapd MLME.

hostapd/hostapd.c

index bc3d5ce..aa43eac 100644 (file)
@@ -159,6 +159,16 @@ int hostapd_reload_config(struct hostapd_iface *iface)
 
        ieee802_11_set_beacon(hapd);
 
+       if (hapd->conf->ssid.ssid_set &&
+           hostapd_set_ssid(hapd, (u8 *) hapd->conf->ssid.ssid,
+                            hapd->conf->ssid.ssid_len)) {
+               wpa_printf(MSG_ERROR, "Could not set SSID for kernel driver");
+               /* try to continue */
+       }
+
+       if (hapd->conf->ieee802_1x || hapd->conf->wpa)
+               hostapd_set_ieee8021x(hapd->conf->iface, hapd, 1);
+
        hostapd_config_free(oldconf);
 
        wpa_printf(MSG_DEBUG, "Reconfigured interface %s", hapd->conf->iface);