aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/interworking.c
diff options
context:
space:
mode:
authorNaresh Jayaram <c_njayar@qti.qualcomm.com>2013-11-01 18:48:03 (GMT)
committerJouni Malinen <j@w1.fi>2013-11-05 08:12:14 (GMT)
commitefc58df29c6d812d17b793128e3085a2e7e883c3 (patch)
tree382386c2ead6272b43baf72080e923e16b8629ae /wpa_supplicant/interworking.c
parentd355372ce46e65a5d30237ae0b5d169ebfaa32fa (diff)
downloadhostap-efc58df29c6d812d17b793128e3085a2e7e883c3.zip
hostap-efc58df29c6d812d17b793128e3085a2e7e883c3.tar.gz
hostap-efc58df29c6d812d17b793128e3085a2e7e883c3.tar.bz2
eap_proxy: Re-read IMSI from proxy in Interworking functionality
Try to read the IMSI values through the eap_proxy layer for Interworking functionality again if the value was not available at startup. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/interworking.c')
-rw-r--r--wpa_supplicant/interworking.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/wpa_supplicant/interworking.c b/wpa_supplicant/interworking.c
index 067b3bd..8667221 100644
--- a/wpa_supplicant/interworking.c
+++ b/wpa_supplicant/interworking.c
@@ -18,6 +18,7 @@
#include "eap_common/eap_defs.h"
#include "eap_peer/eap.h"
#include "eap_peer/eap_methods.h"
+#include "eapol_supp/eapol_supp_sm.h"
#include "wpa_supplicant_i.h"
#include "config.h"
#include "config_ssid.h"
@@ -1383,6 +1384,23 @@ static struct wpa_cred * interworking_credentials_available_3gpp(
if (bss->anqp == NULL || bss->anqp->anqp_3gpp == NULL)
return NULL;
+#ifdef CONFIG_EAP_PROXY
+ if (!wpa_s->imsi[0]) {
+ size_t len;
+ wpa_printf(MSG_DEBUG, "Interworking: IMSI not available - try to read again through eap_proxy");
+ wpa_s->mnc_len = eapol_sm_get_eap_proxy_imsi(wpa_s->eapol,
+ wpa_s->imsi,
+ &len);
+ if (wpa_s->mnc_len > 0) {
+ wpa_s->imsi[len] = '\0';
+ wpa_printf(MSG_DEBUG, "eap_proxy: IMSI %s (MNC length %d)",
+ wpa_s->imsi, wpa_s->mnc_len);
+ } else {
+ wpa_printf(MSG_DEBUG, "eap_proxy: IMSI not available");
+ }
+ }
+#endif /* CONFIG_EAP_PROXY */
+
for (cred = wpa_s->conf->cred; cred; cred = cred->next) {
char *sep;
const char *imsi;