]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
eap_proxy: Fix IMSI fetch for home vs. visited network determination
authorJouni Malinen <j@w1.fi>
Sun, 20 Oct 2013 09:10:53 +0000 (12:10 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 20 Oct 2013 10:12:04 +0000 (13:12 +0300)
Use similar mechanism to CONFIG_PCSC=y case to set the IMSI and MNC
length for eap_proxy. This allows automatic 3GPP realm comparison
against the domain list.

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

wpa_supplicant/interworking.c

index ec3d6cee6e7f01f20b86da1e43037ea5e0252a9c..ba2b2fd483029d1bd7f7cb65931d5c1b81f84141 100644 (file)
@@ -1564,6 +1564,12 @@ int interworking_home_sp_cred(struct wpa_supplicant *wpa_s,
                mnc_len = wpa_s->mnc_len;
        }
 #endif /* CONFIG_PCSC */
+#ifdef CONFIG_EAP_PROXY
+       else if (cred->pcsc && wpa_s->mnc_len > 0 && wpa_s->imsi[0]) {
+               imsi = wpa_s->imsi;
+               mnc_len = wpa_s->mnc_len;
+       }
+#endif /* CONFIG_EAP_PROXY */
        if (domain_names &&
            imsi && build_root_nai(nai, sizeof(nai), imsi, mnc_len, 0) == 0) {
                realm = os_strchr(nai, '@');