aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/interworking.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2012-12-16 10:00:06 (GMT)
committerJouni Malinen <j@w1.fi>2012-12-16 10:00:06 (GMT)
commit2047e596ec7a9a5ee86da47361f3e93cffd56782 (patch)
tree1012deb993ae247b99662e9084f14e5c165e857a /wpa_supplicant/interworking.c
parentf5f37d3a4fc2df2a24676b4f95afca15ed793cba (diff)
downloadhostap-2047e596ec7a9a5ee86da47361f3e93cffd56782.zip
hostap-2047e596ec7a9a5ee86da47361f3e93cffd56782.tar.gz
hostap-2047e596ec7a9a5ee86da47361f3e93cffd56782.tar.bz2
Interworking: Default to TTLS/MSCHAPv2 for NAI Realm list matching
If the AP does not advertize EAP parameters, default to TTLS/MSCHAPv2 when using username/password credentials. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/interworking.c')
-rw-r--r--wpa_supplicant/interworking.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/wpa_supplicant/interworking.c b/wpa_supplicant/interworking.c
index cfe56ea..875abce 100644
--- a/wpa_supplicant/interworking.c
+++ b/wpa_supplicant/interworking.c
@@ -522,7 +522,7 @@ static int nai_realm_cred_username(struct nai_realm_eap *eap)
if (eap->method == EAP_TYPE_TTLS) {
if (eap->inner_method == 0 && eap->inner_non_eap == 0)
- return 0;
+ return 1; /* Assume TTLS/MSCHAPv2 is used */
if (eap->inner_method &&
eap_get_name(EAP_VENDOR_IETF, eap->inner_method) == NULL)
return 0;
@@ -1263,6 +1263,12 @@ int interworking_connect(struct wpa_supplicant *wpa_s, struct wpa_bss *bss)
0) < 0)
goto fail;
break;
+ default:
+ /* EAP params were not set - assume TTLS/MSCHAPv2 */
+ if (wpa_config_set(ssid, "phase2", "\"auth=MSCHAPV2\"",
+ 0) < 0)
+ goto fail;
+ break;
}
break;
case EAP_TYPE_PEAP: