]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Interworking: Set key_mgmt parameter for the temporary network block
authorJouni Malinen <j@w1.fi>
Fri, 3 Aug 2012 19:13:32 +0000 (22:13 +0300)
committerJouni Malinen <j@w1.fi>
Fri, 3 Aug 2012 19:15:42 +0000 (22:15 +0300)
Previously, this was left to the default (WPA-EAP WPA-PSK) value which
could potentially result in unexpected behavior if an AP were to enable
both WPA2-Enterprise and WPA2-Personal in the same BSS. While this is
not really that likely for APs supporting Interworking, it is good to
get the PSK option removed to avoid any issues with missing
passphrase/PSK configuration parameter.

Signed-hostap: Jouni Malinen <j@w1.fi>

wpa_supplicant/interworking.c

index 04a508db0bd509ed7cfbe57e6a47c7069018db22..e0e209c0f56e64f04ca0f950716511a2b8f7a172 100644 (file)
@@ -689,6 +689,9 @@ static int interworking_connect_3gpp(struct wpa_supplicant *wpa_s,
        os_memcpy(ssid->ssid, ie + 2, ie[1]);
        ssid->ssid_len = ie[1];
 
+       if (wpa_config_set(ssid, "key_mgmt", "WPA-EAP", 0) < 0)
+               goto fail;
+
        /* TODO: figure out whether to use EAP-SIM, EAP-AKA, or EAP-AKA' */
        if (wpa_config_set(ssid, "eap", "SIM", 0) < 0) {
                wpa_printf(MSG_DEBUG, "EAP-SIM not supported");
@@ -947,6 +950,9 @@ static int interworking_connect_roaming_consortium(
        os_memcpy(ssid->ssid, ssid_ie + 2, ssid_ie[1]);
        ssid->ssid_len = ssid_ie[1];
 
+       if (wpa_config_set(ssid, "key_mgmt", "WPA-EAP", 0) < 0)
+               goto fail;
+
        if (cred->eap_method == NULL) {
                wpa_printf(MSG_DEBUG, "Interworking: No EAP method set for "
                           "credential using roaming consortium");
@@ -1047,6 +1053,9 @@ int interworking_connect(struct wpa_supplicant *wpa_s, struct wpa_bss *bss)
        os_memcpy(ssid->ssid, ie + 2, ie[1]);
        ssid->ssid_len = ie[1];
 
+       if (wpa_config_set(ssid, "key_mgmt", "WPA-EAP", 0) < 0)
+               goto fail;
+
        if (wpa_config_set(ssid, "eap", eap_get_name(EAP_VENDOR_IETF,
                                                     eap->method), 0) < 0)
                goto fail;