mschapv2_opaque_t *data = ptr;
pairfree(&data->mppe_keys);
+ pairfree(&data->reply);
free(data);
}
data->code = PW_EAP_MSCHAPV2_CHALLENGE;
memcpy(data->challenge, challenge->vp_strvalue, MSCHAPV2_CHALLENGE_LEN);
data->mppe_keys = NULL;
+ data->reply = NULL;
handler->opaque = data;
handler->free_opaque = free_data;
*/
fix_mppe_keys(handler, data);
+ /*
+ * save any other attributes for re-use in the final
+ * access-accept e.g. vlan, etc. This lets the PEAP
+ * use_tunneled_reply code work
+ */
+ data->reply = paircopy(handler->request->reply->vps);
+
/*
* And we need to challenge the user, not ack/reject them,
* so we re-write the ACK to a challenge. Yuck.
*/
handler->request->options &= ~RAD_REQUEST_OPTION_PROXY_EAP;
#endif
+ pairadd(&handler->request->reply->vps, data->reply);
+ data->reply = NULL;
eap_ds->request->code = PW_EAP_SUCCESS;