Skip to content

Commit

Permalink
Fix eap fast private data allocation
Browse files Browse the repository at this point in the history
  • Loading branch information
arr2036 committed Apr 23, 2019
1 parent 022cdf1 commit 6abede8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/modules/rlm_eap/types/rlm_eap_fast/rlm_eap_fast.c
Expand Up @@ -459,13 +459,17 @@ static rlm_rcode_t mod_process(void *instance, UNUSED void *thread, REQUEST *req
eap_session_t *eap_session = eap_session_get(request);
eap_tls_session_t *eap_tls_session = talloc_get_type_abort(eap_session->opaque, eap_tls_session_t);
tls_session_t *tls_session = eap_tls_session->tls_session;
eap_fast_tunnel_t *t = talloc_get_type_abort(tls_session, eap_fast_tunnel_t);
eap_fast_tunnel_t *t;

/*
* We need FAST data associated with the session, so
* allocate it here, if it wasn't already alloacted.
*/
if (!t) tls_session->opaque = eap_fast_alloc(tls_session, inst);
if (!tls_session->opaque) {
t = tls_session->opaque = eap_fast_alloc(tls_session, inst);
} else {
t = talloc_get_type_abort(tls_session->opaque, eap_fast_tunnel_t);
}

/*
* Process TLS layer until done.
Expand Down

0 comments on commit 6abede8

Please sign in to comment.