aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarshan Paranji Sri <dparanji@qti.qualcomm.com>2014-06-03 09:48:05 (GMT)
committerJouni Malinen <j@w1.fi>2014-06-03 10:59:22 (GMT)
commit95b6bca66de9dc0a2ddd9164ec052a7d5f58804b (patch)
tree4d682f543c374a932ad868edb2fecd4475b582aa
parentb246e2af79af60ef298e3a4d1914f6e36171ee7e (diff)
downloadhostap-95b6bca66de9dc0a2ddd9164ec052a7d5f58804b.zip
hostap-95b6bca66de9dc0a2ddd9164ec052a7d5f58804b.tar.gz
hostap-95b6bca66de9dc0a2ddd9164ec052a7d5f58804b.tar.bz2
Add rsn_pairwise bits to set_ieee8021x() driver_ops
This fixes an issue where a driver using the deprecated set_ieee8021x() callback did not include rsn_pairwise bits in the driver configuration even if mixed WPA+WPA2 configuration was used. This could result, e.g., in CCMP not being enabled properly when wpa_pairwise=TKIP and rsn_pairwise=CCMP was used in the configuration. Fix this by using bitwise OR of the wpa_pairwise and rsn_pairwise values to allow the driver to enable all pairwise ciphers. In addition, make the newer set_ap() driver_ops use the same bitwise OR design instead of picking between rsn_pairwise and wpa_pairwise. This makes the code paths consistent and can also fix issues with mixed mode configuration with set_ap(). Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
-rw-r--r--src/ap/ap_drv_ops.c3
-rw-r--r--src/ap/beacon.c4
2 files changed, 4 insertions, 3 deletions
diff --git a/src/ap/ap_drv_ops.c b/src/ap/ap_drv_ops.c
index 6d3ae5a..cc4ac10 100644
--- a/src/ap/ap_drv_ops.c
+++ b/src/ap/ap_drv_ops.c
@@ -280,7 +280,8 @@ int hostapd_set_drv_ieee8021x(struct hostapd_data *hapd, const char *ifname,
params.wpa = hapd->conf->wpa;
params.ieee802_1x = hapd->conf->ieee802_1x;
params.wpa_group = hapd->conf->wpa_group;
- params.wpa_pairwise = hapd->conf->wpa_pairwise;
+ params.wpa_pairwise = hapd->conf->wpa_pairwise |
+ hapd->conf->rsn_pairwise;
params.wpa_key_mgmt = hapd->conf->wpa_key_mgmt;
params.rsn_preauth = hapd->conf->rsn_preauth;
#ifdef CONFIG_IEEE80211W
diff --git a/src/ap/beacon.c b/src/ap/beacon.c
index 27525dc..2a4acf2 100644
--- a/src/ap/beacon.c
+++ b/src/ap/beacon.c
@@ -882,8 +882,8 @@ int ieee802_11_build_ap_params(struct hostapd_data *hapd,
params->basic_rates = hapd->iface->basic_rates;
params->ssid = hapd->conf->ssid.ssid;
params->ssid_len = hapd->conf->ssid.ssid_len;
- params->pairwise_ciphers = hapd->conf->rsn_pairwise ?
- hapd->conf->rsn_pairwise : hapd->conf->wpa_pairwise;
+ params->pairwise_ciphers = hapd->conf->wpa_pairwise |
+ hapd->conf->rsn_pairwise;
params->group_cipher = hapd->conf->wpa_group;
params->key_mgmt_suites = hapd->conf->wpa_key_mgmt;
params->auth_algs = hapd->conf->auth_algs;