From 6641954321369dfb1f68e7eddb91edf1dacaae4b Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sat, 14 May 2016 19:40:40 +0300 Subject: [PATCH] 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 --- wpa_supplicant/ap.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wpa_supplicant/ap.c b/wpa_supplicant/ap.c index 49fbc1bc4..a4b08748f 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));