From e241b1b4f24d8cb4943e4f5abcc779532cc65ccd Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 20 Oct 2013 12:10:53 +0300 Subject: [PATCH] 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 --- wpa_supplicant/interworking.c | 6 ++++++ 1 file changed, 6 insertions(+) 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, '@');