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>
This commit is contained in:
Jouni Malinen 2019-08-18 15:23:12 +03:00
parent 8315c1ef5b
commit 822e7c66ae
26 changed files with 486 additions and 637 deletions

View file

@ -109,7 +109,7 @@ static struct wpabuf * eap_mschapv2_build_challenge(
return NULL;
}
ms_len = sizeof(*ms) + 1 + CHALLENGE_LEN + sm->server_id_len;
ms_len = sizeof(*ms) + 1 + CHALLENGE_LEN + sm->cfg->server_id_len;
req = eap_msg_alloc(EAP_VENDOR_IETF, EAP_TYPE_MSCHAPV2, ms_len,
EAP_CODE_REQUEST, id);
if (req == NULL) {
@ -131,7 +131,7 @@ static struct wpabuf * eap_mschapv2_build_challenge(
wpabuf_put(req, CHALLENGE_LEN);
wpa_hexdump(MSG_MSGDUMP, "EAP-MSCHAPV2: Challenge",
data->auth_challenge, CHALLENGE_LEN);
wpabuf_put_data(req, sm->server_id, sm->server_id_len);
wpabuf_put_data(req, sm->cfg->server_id, sm->cfg->server_id_len);
return req;
}