Interworking: Set key_mgmt parameter for the temporary network block

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>
This commit is contained in:
Jouni Malinen 2012-08-03 22:13:32 +03:00
parent 955567bc09
commit 1ecd2ada33

View 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;