aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/wpas_glue.c
diff options
context:
space:
mode:
authorSunil Dutt <usdutt@qti.qualcomm.com>2015-02-26 10:24:37 (GMT)
committerJouni Malinen <j@w1.fi>2015-03-02 10:47:20 (GMT)
commitdd5c155e2e74f44a46190863a0fa3e0faf427be3 (patch)
treef3972481477219a9c84e82c1077b35d51f119f22 /wpa_supplicant/wpas_glue.c
parent9a05d98bf9e07f3cdda3ca2af664045f458efe35 (diff)
downloadhostap-dd5c155e2e74f44a46190863a0fa3e0faf427be3.zip
hostap-dd5c155e2e74f44a46190863a0fa3e0faf427be3.tar.gz
hostap-dd5c155e2e74f44a46190863a0fa3e0faf427be3.tar.bz2
eap_proxy: Callback to notify any updates from eap_proxy
This commit introduces a callback to notify any configuration updates from the eap_proxy layer. This is used to trigger re-reading of IMSI and MNC length. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/wpas_glue.c')
-rw-r--r--wpa_supplicant/wpas_glue.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/wpa_supplicant/wpas_glue.c b/wpa_supplicant/wpas_glue.c
index 99e7351..1bb82ba 100644
--- a/wpa_supplicant/wpas_glue.c
+++ b/wpa_supplicant/wpas_glue.c
@@ -842,6 +842,25 @@ static void wpa_supplicant_eap_param_needed(void *ctx,
#endif /* CONFIG_CTRL_IFACE || !CONFIG_NO_STDOUT_DEBUG */
+#ifdef CONFIG_EAP_PROXY
+static void wpa_supplicant_eap_proxy_cb(void *ctx)
+{
+ struct wpa_supplicant *wpa_s = ctx;
+ size_t len;
+
+ 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 */
+
+
static void wpa_supplicant_port_cb(void *ctx, int authorized)
{
struct wpa_supplicant *wpa_s = ctx;
@@ -947,6 +966,9 @@ int wpa_supplicant_init_eapol(struct wpa_supplicant *wpa_s)
ctx->openssl_ciphers = wpa_s->conf->openssl_ciphers;
ctx->wps = wpa_s->wps;
ctx->eap_param_needed = wpa_supplicant_eap_param_needed;
+#ifdef CONFIG_EAP_PROXY
+ ctx->eap_proxy_cb = wpa_supplicant_eap_proxy_cb;
+#endif /* CONFIG_EAP_PROXY */
ctx->port_cb = wpa_supplicant_port_cb;
ctx->cb = wpa_supplicant_eapol_cb;
ctx->cert_cb = wpa_supplicant_cert_cb;