aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2009-04-03 17:14:39 (GMT)
committerJouni Malinen <j@w1.fi>2009-04-20 09:13:41 (GMT)
commit9e0be9c75c97902cf0f974736d0828ea6a5ad52a (patch)
tree6d82afc53a4154eef975afe4c6e79da9453c12b6
parent6eeb267fed50fd1b0d95fb09073979055b80c12a (diff)
downloadhostap-06-9e0be9c75c97902cf0f974736d0828ea6a5ad52a.zip
hostap-06-9e0be9c75c97902cf0f974736d0828ea6a5ad52a.tar.gz
hostap-06-9e0be9c75c97902cf0f974736d0828ea6a5ad52a.tar.bz2
Fix some multi-BSSID configuration operations
Static WEP keys were configured only for the first BSS. In addition, STAs were flushed only for the first BSS. These operations should be in hostapd_setup_bss(), not setup_interface(). Remove extra call to ieee802_11_set_beacon() for the first BSS. This should only be done from hostapd_setup_bss(), i.e., once for each BSS. (cherry picked from commit c213cc04332983fdf030224b9029cf7bb4e23dfd)
-rw-r--r--hostapd/hostapd.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/hostapd/hostapd.c b/hostapd/hostapd.c
index cdd16ec..2696bd6 100644
--- a/hostapd/hostapd.c
+++ b/hostapd/hostapd.c
@@ -339,6 +339,7 @@ int hostapd_reload_config(struct hostapd_iface *iface)
struct hostapd_data *hapd = iface->bss[0];
struct hostapd_config *newconf, *oldconf;
struct wpa_auth_config wpa_auth_conf;
+ size_t j;
newconf = hostapd_config_read(iface->config_fname);
if (newconf == NULL)
@@ -348,7 +349,8 @@ int hostapd_reload_config(struct hostapd_iface *iface)
* Deauthenticate all stations since the new configuration may not
* allow them to use the BSS anymore.
*/
- hostapd_flush_old_stations(hapd);
+ for (j = 0; j < iface->num_bss; j++)
+ hostapd_flush_old_stations(iface->bss[j]);
/* TODO: update dynamic data based on changed configuration
* items (e.g., open/close sockets, etc.) */
@@ -1318,6 +1320,13 @@ static int hostapd_setup_bss(struct hostapd_data *hapd, int first)
}
}
+ hostapd_flush_old_stations(hapd);
+ hostapd_set_privacy(hapd, 0);
+
+ hostapd_broadcast_wep_clear(hapd);
+ if (hostapd_setup_encryption(hapd->conf->iface, hapd))
+ return -1;
+
/*
* Fetch the SSID from the system and use it or,
* if one was specified in the config file, verify they
@@ -1591,9 +1600,6 @@ static int setup_interface(struct hostapd_iface *iface)
}
}
- hostapd_flush_old_stations(hapd);
- hostapd_set_privacy(hapd, 0);
-
if (hapd->iconf->channel) {
freq = hostapd_hw_get_freq(hapd, hapd->iconf->channel);
wpa_printf(MSG_DEBUG, "Mode: %s Channel: %d "
@@ -1610,12 +1616,7 @@ static int setup_interface(struct hostapd_iface *iface)
}
}
- hostapd_broadcast_wep_clear(hapd);
- if (hostapd_setup_encryption(hapd->conf->iface, hapd))
- return -1;
-
hostapd_set_beacon_int(hapd, hapd->iconf->beacon_int);
- ieee802_11_set_beacon(hapd);
if (hapd->iconf->rts_threshold > -1 &&
hostapd_set_rts(hapd, hapd->iconf->rts_threshold)) {