- pdu = (struct eap_hdr *)inputToken->value;
- pos = (unsigned char *)(pdu + 1);
-
- if (inputToken->length > sizeof(*pdu) &&
- pdu->code == EAP_CODE_RESPONSE &&
- pos[0] == EAP_TYPE_IDENTITY) {
- /*
- * XXX TODO do we really need to set User-Name? FreeRADIUS does
- * not require it but some other RADIUS servers might.
- */
- major = addAvpFromBuffer(minor, rh, &send, PW_USER_NAME, 0, &nameBuf);
- if (GSS_ERROR(major))
- goto cleanup;
+ if (rs_packet_create_acc_request(rconn, &req, NULL, NULL) != 0) {
+ major = gssEapRadiusMapError(minor, rs_err_conn_pop(rconn));
+ goto cleanup;
+ }
+ frreq = rs_packet_frpkt(req);