aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/interworking.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2012-12-17 21:27:15 (GMT)
committerJouni Malinen <j@w1.fi>2012-12-17 21:27:15 (GMT)
commit03c961e54267250a0f1a891296b78075fec67b2c (patch)
tree5094ed127c24d07f060bce1f6893534ab78719f4 /wpa_supplicant/interworking.c
parentf1b44874c2d91ddfbbc2cf1ede45a742c1e9adbe (diff)
downloadhostap-03c961e54267250a0f1a891296b78075fec67b2c.zip
hostap-03c961e54267250a0f1a891296b78075fec67b2c.tar.gz
hostap-03c961e54267250a0f1a891296b78075fec67b2c.tar.bz2
Interworking: Default to EAP-MSCHAPv2 with EAP-PEAP
If the NAI Realm list indicates that EAP-PEAP is used, use EAP-MSCHAPv2 as the Phase 2 method by default if the NAI Realm list does not specify the tunneled method. Signed-hostap: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant/interworking.c')
-rw-r--r--wpa_supplicant/interworking.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/wpa_supplicant/interworking.c b/wpa_supplicant/interworking.c
index 64d6ae0..d26ca42 100644
--- a/wpa_supplicant/interworking.c
+++ b/wpa_supplicant/interworking.c
@@ -516,9 +516,14 @@ static int nai_realm_cred_username(struct nai_realm_eap *eap)
return 0;
}
- if (eap->method == EAP_TYPE_PEAP &&
- eap_get_name(EAP_VENDOR_IETF, eap->inner_method) == NULL)
- return 0;
+ if (eap->method == EAP_TYPE_PEAP) {
+ if (eap->inner_method &&
+ eap_get_name(EAP_VENDOR_IETF, eap->inner_method) == NULL)
+ return 0;
+ if (!eap->inner_method &&
+ eap_get_name(EAP_VENDOR_IETF, EAP_TYPE_MSCHAPV2) == NULL)
+ return 0;
+ }
if (eap->method == EAP_TYPE_TTLS) {
if (eap->inner_method == 0 && eap->inner_non_eap == 0)
@@ -1294,7 +1299,10 @@ int interworking_connect(struct wpa_supplicant *wpa_s, struct wpa_bss *bss)
break;
case EAP_TYPE_PEAP:
os_snprintf(buf, sizeof(buf), "\"auth=%s\"",
- eap_get_name(EAP_VENDOR_IETF, eap->inner_method));
+ eap_get_name(EAP_VENDOR_IETF,
+ eap->inner_method ?
+ eap->inner_method :
+ EAP_TYPE_MSCHAPV2));
if (wpa_config_set(ssid, "phase2", buf, 0) < 0)
goto fail;
break;