ERP: Do not pass full EAP header to eap_peer_erp_reauth_start()
That function does not need the full EAP header -- it only needs to know which EAP identifier to use in the message. Make this usable for cases where the previous EAP message may not exist (FILS). Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
2449791b8e
commit
bf07e05349
1 changed files with 3 additions and 4 deletions
|
@ -571,8 +571,7 @@ fail:
|
||||||
|
|
||||||
|
|
||||||
#ifdef CONFIG_ERP
|
#ifdef CONFIG_ERP
|
||||||
static int eap_peer_erp_reauth_start(struct eap_sm *sm,
|
static int eap_peer_erp_reauth_start(struct eap_sm *sm, u8 eap_id)
|
||||||
const struct eap_hdr *hdr, size_t len)
|
|
||||||
{
|
{
|
||||||
char *realm;
|
char *realm;
|
||||||
struct eap_erp_key *erp;
|
struct eap_erp_key *erp;
|
||||||
|
@ -599,7 +598,7 @@ static int eap_peer_erp_reauth_start(struct eap_sm *sm,
|
||||||
|
|
||||||
msg = eap_msg_alloc(EAP_VENDOR_IETF, (EapType) EAP_ERP_TYPE_REAUTH,
|
msg = eap_msg_alloc(EAP_VENDOR_IETF, (EapType) EAP_ERP_TYPE_REAUTH,
|
||||||
1 + 2 + 2 + os_strlen(erp->keyname_nai) + 1 + 16,
|
1 + 2 + 2 + os_strlen(erp->keyname_nai) + 1 + 16,
|
||||||
EAP_CODE_INITIATE, hdr->identifier);
|
EAP_CODE_INITIATE, eap_id);
|
||||||
if (msg == NULL)
|
if (msg == NULL)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
@ -1566,7 +1565,7 @@ static void eap_peer_initiate(struct eap_sm *sm, const struct eap_hdr *hdr,
|
||||||
/* TODO: Derivation of domain specific keys for local ER */
|
/* TODO: Derivation of domain specific keys for local ER */
|
||||||
}
|
}
|
||||||
|
|
||||||
if (eap_peer_erp_reauth_start(sm, hdr, len) == 0)
|
if (eap_peer_erp_reauth_start(sm, hdr->identifier) == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
invalid:
|
invalid:
|
||||||
|
|
Loading…
Reference in a new issue