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 <j@w1.fi>
This commit is contained in:
Jouni Malinen 2013-10-20 12:10:53 +03:00
parent db13605816
commit e241b1b4f2

View 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, '@');