wpa_supplicant: Set configured auth_algs for AP mode
authorVasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Wed, 16 Nov 2011 14:30:36 +0000 (16:30 +0200)
committerJouni Malinen <j@w1.fi>
Wed, 16 Nov 2011 14:30:36 +0000 (16:30 +0200)
In AP mode, authentication algorithm is reset in
hostapd_config_defaults_bss() and never set to the configured one. This
would pass the default auth_algs (OPEN|SHARED) to driver regardless of
what the wpa_supplicant configuration is requesting.

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
wpa_supplicant/ap.c

index 1332eff..91c9126 100644 (file)
@@ -137,6 +137,9 @@ static int wpa_supplicant_conf_ap(struct wpa_supplicant *wpa_s,
        bss->ssid.ssid_len = ssid->ssid_len;
        bss->ssid.ssid_set = 1;
 
+       if (ssid->auth_alg)
+               bss->auth_algs = ssid->auth_alg;
+
        if (wpa_key_mgmt_wpa_psk(ssid->key_mgmt))
                bss->wpa = ssid->proto;
        bss->wpa_key_mgmt = ssid->key_mgmt;