aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2009-04-02 16:54:13 (GMT)
committerJouni Malinen <j@w1.fi>2009-04-20 09:11:58 (GMT)
commit135e75c515161759cce4110709bfe840bb3807d5 (patch)
treebd57ef8f1eb15e0d319dc212f2df265adf5002bd
parent86441a0b8a62f5ea18abcf46244c533396436ce6 (diff)
downloadhostap-06-135e75c515161759cce4110709bfe840bb3807d5.zip
hostap-06-135e75c515161759cce4110709bfe840bb3807d5.tar.gz
hostap-06-135e75c515161759cce4110709bfe840bb3807d5.tar.bz2
Fix RSN parameter setting for multi-BSS case
rsn_pairwise and wpa_group were set properly only for the last BSS, but they do need to be set for all BSSes. (cherry picked from commit f1f54cb8b1b47e2340dfbe937fac594725819a20)
-rw-r--r--hostapd/config.c41
1 files changed, 21 insertions, 20 deletions
diff --git a/hostapd/config.c b/hostapd/config.c
index e90fa36..24adc68 100644
--- a/hostapd/config.c
+++ b/hostapd/config.c
@@ -2255,29 +2255,30 @@ struct hostapd_config * hostapd_config_read(const char *fname)
fclose(f);
- if (bss->individual_wep_key_len == 0) {
- /* individual keys are not use; can use key idx0 for broadcast
- * keys */
- bss->broadcast_key_idx_min = 0;
- }
-
- /* Select group cipher based on the enabled pairwise cipher suites */
- pairwise = 0;
- if (bss->wpa & 1)
- pairwise |= bss->wpa_pairwise;
- if (bss->wpa & 2) {
- if (bss->rsn_pairwise == 0)
- bss->rsn_pairwise = bss->wpa_pairwise;
- pairwise |= bss->rsn_pairwise;
- }
- if (pairwise & WPA_CIPHER_TKIP)
- bss->wpa_group = WPA_CIPHER_TKIP;
- else
- bss->wpa_group = WPA_CIPHER_CCMP;
-
for (i = 0; i < conf->num_bss; i++) {
bss = &conf->bss[i];
+ if (bss->individual_wep_key_len == 0) {
+ /* individual keys are not use; can use key idx0 for
+ * broadcast keys */
+ bss->broadcast_key_idx_min = 0;
+ }
+
+ /* Select group cipher based on the enabled pairwise cipher
+ * suites */
+ pairwise = 0;
+ if (bss->wpa & 1)
+ pairwise |= bss->wpa_pairwise;
+ if (bss->wpa & 2) {
+ if (bss->rsn_pairwise == 0)
+ bss->rsn_pairwise = bss->wpa_pairwise;
+ pairwise |= bss->rsn_pairwise;
+ }
+ if (pairwise & WPA_CIPHER_TKIP)
+ bss->wpa_group = WPA_CIPHER_TKIP;
+ else
+ bss->wpa_group = WPA_CIPHER_CCMP;
+
bss->radius->auth_server = bss->radius->auth_servers;
bss->radius->acct_server = bss->radius->acct_servers;