]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Interworking: Default to TTLS/MSCHAPv2 for NAI Realm list matching
authorJouni Malinen <jouni@qca.qualcomm.com>
Sun, 16 Dec 2012 10:00:06 +0000 (12:00 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 16 Dec 2012 10:00:06 +0000 (12:00 +0200)
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>

wpa_supplicant/interworking.c

index cfe56ea99435fac41394ce7ae972f5bab39acb8c..875abce20675fcda732c7b560e6d71f408c48d05 100644 (file)
@@ -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: