summaryrefslogtreecommitdiff
path: root/pppd/eap.c
diff options
context:
space:
mode:
authorEivind Næss <eivnaes@yahoo.com>2022-02-03 14:28:22 -0800
committerGitHub <noreply@github.com>2022-02-04 09:28:22 +1100
commitd7e62a8499c4032d79e05afbd8fd3efd51c5b148 (patch)
tree46d612f2a36aca11557196ce1266b18d0aa25f68 /pppd/eap.c
parentc2881a6b71a36d28a89166e82820dc5e711fd775 (diff)
downloadppp-d7e62a8499c4032d79e05afbd8fd3efd51c5b148.tar.gz
pppd/eap: Fix bug causing incorrect response length (#334)
Need to update the esp->ea_client.ea_namelen variable. A plugin can override the name of the user, and the variable is passed onto the eap_chap2_response generating the wrong response length. Signed-off-by: Eivind Næss <eivnaes@yahoo.com>
Diffstat (limited to 'pppd/eap.c')
-rw-r--r--pppd/eap.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/pppd/eap.c b/pppd/eap.c
index 54c3d42..6cb595f 100644
--- a/pppd/eap.c
+++ b/pppd/eap.c
@@ -2182,6 +2182,7 @@ eap_request(eap_state *esp, u_char *inp, int id, int len)
eap_send_nak(esp, id, EAPT_SRP);
break;
}
+ esp->es_client.ea_namelen = strlen(esp->es_client.ea_name);
/* Create the MSCHAPv2 response (and add to cache) */
unsigned char response[MS_CHAP2_RESPONSE_LEN+1]; // VLEN + VALUE