EAP-TTLS server: Add Ident field to MS-CHAP-Error

Per RFC 2548, 2.1.5, MS-CHAP-Error contains an Ident field of one octet
followed by an ASCII message. Add the missing Ident field.

Signed-off-by: Yihong Wu <wu@domosekai.com>
This commit is contained in:
Yihong Wu 2023-02-09 07:44:50 -05:00 committed by Jouni Malinen
parent 4ae798a22c
commit 390e24c6cb

View file

@ -445,7 +445,8 @@ static struct wpabuf * eap_ttls_build_phase2_mschapv2(
sizeof(data->mschapv2_auth_response));
} else {
pos = eap_ttls_avp_hdr(pos, RADIUS_ATTR_MS_CHAP_ERROR,
RADIUS_VENDOR_ID_MICROSOFT, 1, 6);
RADIUS_VENDOR_ID_MICROSOFT, 1, 7);
*pos++ = data->mschapv2_ident;
os_memcpy(pos, "Failed", 6);
pos += 6;
AVP_PAD(req, pos);