From: Jouni Malinen Date: Sun, 20 Oct 2013 09:10:53 +0000 (+0300) Subject: eap_proxy: Fix IMSI fetch for home vs. visited network determination X-Git-Tag: hostap_2_1~829 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e241b1b4f24d8cb4943e4f5abcc779532cc65ccd;p=thirdparty%2Fhostap.git eap_proxy: Fix IMSI fetch for home vs. visited network determination 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 --- diff --git a/wpa_supplicant/interworking.c b/wpa_supplicant/interworking.c index ec3d6cee6..ba2b2fd48 100644 --- a/wpa_supplicant/interworking.c +++ b/wpa_supplicant/interworking.c @@ -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, '@');