diff options
author | Jouni Malinen <j@w1.fi> | 2015-09-27 13:25:00 +0300 |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2015-09-27 15:55:11 +0300 |
commit | 2976715217f8748227b10e125514bc663e9acd65 (patch) | |
tree | d13c0782c48061d5730cfa8136414111783ade8a | |
parent | be5ab8d4ab95222208978504af9646ded1e2a430 (diff) | |
download | hostap-2976715217f8748227b10e125514bc663e9acd65.tar.gz |
Do not clear RSN parameters before full configuration
This fixes an issue where hostapd SET command is used to configure RSN
parameters and the wpa parameter is sent after the other parameters.
Previously, the default case here ended up clearing rsn_pairwise and
wpa_pairwise values and once wpa=2 was finally set, the cipher
configuration had already been lost.
Signed-off-by: Jouni Malinen <j@w1.fi>
-rw-r--r-- | src/ap/ap_config.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/ap/ap_config.c b/src/ap/ap_config.c index 75804a069..9a96e50b7 100644 --- a/src/ap/ap_config.c +++ b/src/ap/ap_config.c @@ -975,10 +975,11 @@ void hostapd_set_security_params(struct hostapd_bss_config *bss, bss->rsn_pairwise = WPA_CIPHER_CCMP; } else { bss->ssid.security_policy = SECURITY_PLAINTEXT; - bss->wpa_group = WPA_CIPHER_NONE; - bss->wpa_pairwise = WPA_CIPHER_NONE; - bss->rsn_pairwise = WPA_CIPHER_NONE; - if (full_config) + if (full_config) { + bss->wpa_group = WPA_CIPHER_NONE; + bss->wpa_pairwise = WPA_CIPHER_NONE; + bss->rsn_pairwise = WPA_CIPHER_NONE; bss->wpa_key_mgmt = WPA_KEY_MGMT_NONE; + } } } |