- int code;
- VALUE_PAIR *send = NULL;
- VALUE_PAIR *received = NULL;
- rc_handle *rh = ctx->acceptorCtx.radHandle;
- char msgBuffer[4096];
- struct eap_hdr *pdu;
- unsigned char *pos;
- gss_buffer_desc nameBuf = GSS_C_EMPTY_BUFFER;
-
- 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);
+ struct rs_handle *rh;
+ struct rs_connection *rconn;
+ struct rs_packet *req = NULL, *resp = NULL;
+ struct radius_packet *frreq, *frresp;
+ int sendAcceptorIdentity = 0;
+
+ if (ctx->acceptorCtx.radHandle == NULL) {
+ /* May be NULL from an imported partial context */
+ major = gssEapRadiusAllocConn(minor, cred, ctx);