aboutsummaryrefslogtreecommitdiffstats
path: root/eap_example/eap_example_server.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2019-08-18 12:23:12 (GMT)
committerJouni Malinen <j@w1.fi>2019-08-18 14:36:32 (GMT)
commit822e7c66ae36691d6b82a82542177665ff06276b (patch)
tree3454d7cc54520c0ec29f39428be3684d7c69c048 /eap_example/eap_example_server.c
parent8315c1ef5baa4ae0f462e005096d04d5ffdd74ed (diff)
downloadhostap-822e7c66ae36691d6b82a82542177665ff06276b.zip
hostap-822e7c66ae36691d6b82a82542177665ff06276b.tar.gz
hostap-822e7c66ae36691d6b82a82542177665ff06276b.tar.bz2
EAP server: Use struct eap_config to avoid duplicated definitions
Use struct eap_config as-is within struct eap_sm and EAPOL authenticator to avoid having to duplicate all the configuration variables at each interface. Split the couple of session specific variables into a separate struct to allow a single const struct eap_config to be used. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'eap_example/eap_example_server.c')
-rw-r--r--eap_example/eap_example_server.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/eap_example/eap_example_server.c b/eap_example/eap_example_server.c
index 145bb9f..1e91fa8 100644
--- a/eap_example/eap_example_server.c
+++ b/eap_example/eap_example_server.c
@@ -207,6 +207,8 @@ static int eap_server_register_methods(void)
int eap_example_server_init(void)
{
+ struct eap_session_data eap_sess;
+
if (eap_server_register_methods() < 0)
return -1;
@@ -223,7 +225,9 @@ int eap_example_server_init(void)
eap_conf.eap_server = 1;
eap_conf.ssl_ctx = eap_ctx.tls_ctx;
- eap_ctx.eap = eap_server_sm_init(&eap_ctx, &eap_cb, &eap_conf);
+ os_memset(&eap_sess, 0, sizeof(eap_sess));
+ eap_ctx.eap = eap_server_sm_init(&eap_ctx, &eap_cb, &eap_conf,
+ &eap_sess);
if (eap_ctx.eap == NULL)
return -1;