aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2016-05-14 16:40:40 (GMT)
committerJouni Malinen <j@w1.fi>2016-05-14 16:43:30 (GMT)
commit6641954321369dfb1f68e7eddb91edf1dacaae4b (patch)
tree2e9d806c3623eac2046421504ebcbd68da5dea19 /wpa_supplicant
parentad6cee3fa04103e4b7155efc0da593d155e05c34 (diff)
downloadhostap-6641954321369dfb1f68e7eddb91edf1dacaae4b.zip
hostap-6641954321369dfb1f68e7eddb91edf1dacaae4b.tar.gz
hostap-6641954321369dfb1f68e7eddb91edf1dacaae4b.tar.bz2
Fix AP mode key_mgmt configuration in wpa_supplicant default case
If the network profile key_mgmt parameter was not set, wpa_supplicant defaulted to enabling both WPA-PSK and WPA-EAP. This is not correct for AP mode operations, so remove WPA-EAP in such a case to fix WPA-PSK without explicit key_mgmt parameter. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant')
-rw-r--r--wpa_supplicant/ap.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/wpa_supplicant/ap.c b/wpa_supplicant/ap.c
index 49fbc1b..a4b0874 100644
--- a/wpa_supplicant/ap.c
+++ b/wpa_supplicant/ap.c
@@ -294,7 +294,10 @@ static int wpa_supplicant_conf_ap(struct wpa_supplicant *wpa_s,
if (wpa_key_mgmt_wpa_psk(ssid->key_mgmt))
bss->wpa = ssid->proto;
- bss->wpa_key_mgmt = ssid->key_mgmt;
+ if (ssid->key_mgmt == DEFAULT_KEY_MGMT)
+ bss->wpa_key_mgmt = WPA_KEY_MGMT_PSK;
+ else
+ bss->wpa_key_mgmt = ssid->key_mgmt;
bss->wpa_pairwise = ssid->pairwise_cipher;
if (ssid->psk_set) {
bin_clear_free(bss->ssid.wpa_psk, sizeof(*bss->ssid.wpa_psk));