aboutsummaryrefslogtreecommitdiffstats
path: root/src/eapol_auth/eapol_auth_sm.c
diff options
context:
space:
mode:
authorMichael Braun <michael-dev@fami-braun.de>2012-08-19 11:23:20 (GMT)
committerJouni Malinen <j@w1.fi>2012-08-19 11:23:20 (GMT)
commit1a819aa7d5ab9bbdd0dd33f2d9e0911edeb2a2f7 (patch)
tree076dd621c07aeced70c70d0828ddc2de5b125f37 /src/eapol_auth/eapol_auth_sm.c
parent2092597fee6e7ddccd8d101c7f3ec9f487d5a406 (diff)
downloadhostap-1a819aa7d5ab9bbdd0dd33f2d9e0911edeb2a2f7.zip
hostap-1a819aa7d5ab9bbdd0dd33f2d9e0911edeb2a2f7.tar.gz
hostap-1a819aa7d5ab9bbdd0dd33f2d9e0911edeb2a2f7.tar.bz2
Initialize EAPOL auth identity/cui with STA entry data
If RADIUS ACL was used for the STA, identity/cui may already be known at this point. Signed-hostap: Michael Braun <michael-dev@fami-braun.de>
Diffstat (limited to 'src/eapol_auth/eapol_auth_sm.c')
-rw-r--r--src/eapol_auth/eapol_auth_sm.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/eapol_auth/eapol_auth_sm.c b/src/eapol_auth/eapol_auth_sm.c
index 8d6d18f..c3ccb46 100644
--- a/src/eapol_auth/eapol_auth_sm.c
+++ b/src/eapol_auth/eapol_auth_sm.c
@@ -757,7 +757,8 @@ SM_STEP(CTRL_DIR)
struct eapol_state_machine *
eapol_auth_alloc(struct eapol_authenticator *eapol, const u8 *addr,
int flags, const struct wpabuf *assoc_wps_ie,
- const struct wpabuf *assoc_p2p_ie, void *sta_ctx)
+ const struct wpabuf *assoc_p2p_ie, void *sta_ctx,
+ const char *identity, const char *radius_cui)
{
struct eapol_state_machine *sm;
struct eap_config eap_conf;
@@ -838,6 +839,15 @@ eapol_auth_alloc(struct eapol_authenticator *eapol, const u8 *addr,
eapol_auth_initialize(sm);
+ if (identity) {
+ sm->identity = (u8 *) os_strdup(identity);
+ if (sm->identity)
+ sm->identity_len = os_strlen(identity);
+ }
+ if (radius_cui)
+ sm->radius_cui = wpabuf_alloc_copy(radius_cui,
+ os_strlen(radius_cui));
+
return sm;
}