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>
This commit is contained in:
parent
2092597fee
commit
1a819aa7d5
3 changed files with 15 additions and 3 deletions
|
@ -722,7 +722,8 @@ ieee802_1x_alloc_eapol_sm(struct hostapd_data *hapd, struct sta_info *sta)
|
||||||
flags |= EAPOL_SM_FROM_PMKSA_CACHE;
|
flags |= EAPOL_SM_FROM_PMKSA_CACHE;
|
||||||
}
|
}
|
||||||
return eapol_auth_alloc(hapd->eapol_auth, sta->addr, flags,
|
return eapol_auth_alloc(hapd->eapol_auth, sta->addr, flags,
|
||||||
sta->wps_ie, sta->p2p_ie, sta);
|
sta->wps_ie, sta->p2p_ie, sta,
|
||||||
|
sta->identity, sta->radius_cui);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -757,7 +757,8 @@ SM_STEP(CTRL_DIR)
|
||||||
struct eapol_state_machine *
|
struct eapol_state_machine *
|
||||||
eapol_auth_alloc(struct eapol_authenticator *eapol, const u8 *addr,
|
eapol_auth_alloc(struct eapol_authenticator *eapol, const u8 *addr,
|
||||||
int flags, const struct wpabuf *assoc_wps_ie,
|
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 eapol_state_machine *sm;
|
||||||
struct eap_config eap_conf;
|
struct eap_config eap_conf;
|
||||||
|
@ -838,6 +839,15 @@ eapol_auth_alloc(struct eapol_authenticator *eapol, const u8 *addr,
|
||||||
|
|
||||||
eapol_auth_initialize(sm);
|
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;
|
return sm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -77,7 +77,8 @@ void eapol_auth_deinit(struct eapol_authenticator *eapol);
|
||||||
struct eapol_state_machine *
|
struct eapol_state_machine *
|
||||||
eapol_auth_alloc(struct eapol_authenticator *eapol, const u8 *addr,
|
eapol_auth_alloc(struct eapol_authenticator *eapol, const u8 *addr,
|
||||||
int flags, const struct wpabuf *assoc_wps_ie,
|
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);
|
||||||
void eapol_auth_free(struct eapol_state_machine *sm);
|
void eapol_auth_free(struct eapol_state_machine *sm);
|
||||||
void eapol_auth_step(struct eapol_state_machine *sm);
|
void eapol_auth_step(struct eapol_state_machine *sm);
|
||||||
void eapol_auth_dump_state(FILE *f, const char *prefix,
|
void eapol_auth_dump_state(FILE *f, const char *prefix,
|
||||||
|
|
Loading…
Reference in a new issue