*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*
- * Copyright 2000-2003 The FreeRADIUS server project
+ * Copyright 2000-2003,2006 The FreeRADIUS server project
* Copyright 2001 hereUare Communications, Inc. <raghud@hereuare.com>
* Copyright 2003 Alan DeKok <aland@freeradius.org>
* Copyright 2003 Michael Richardson <mcr@sandelman.ottawa.on.ca>
*
*/
-#include "libradius.h"
-#include "eap_types.h"
+#include <freeradius-devel/ident.h>
+RCSID("$Id$")
-static const char rcsid[] = "$Id$";
+#include <freeradius-devel/autoconf.h>
+#include <freeradius-devel/missing.h>
+#include <freeradius-devel/libradius.h>
+#include "eap_types.h"
static const char *eap_types[] = {
"",
* This memory gets freed up when packet is freed up
*/
eap_msg = paircreate(PW_EAP_MESSAGE, PW_TYPE_OCTETS);
- memcpy(eap_msg->strvalue, ptr, len);
+ memcpy(eap_msg->vp_strvalue, ptr, len);
eap_msg->length = len;
pairadd(&(packet->vps), eap_msg);
ptr += len;
vp = pairfind(packet->vps, PW_MESSAGE_AUTHENTICATOR);
if (!vp) {
vp = paircreate(PW_MESSAGE_AUTHENTICATOR, PW_TYPE_OCTETS);
- memset(vp->strvalue, 0, AUTH_VECTOR_LEN);
+ memset(vp->vp_strvalue, 0, AUTH_VECTOR_LEN);
vp->length = AUTH_VECTOR_LEN;
pairadd(&(packet->vps), vp);
}
ep.id = id;
ep.type.type = eap_type;
ep.type.length = vp->length;
- ep.type.data = vp->vp_octets;
+ ep.type.data = malloc(vp->length);
- memcpy(ep.type.data,vp->strvalue, vp->length);
++ memcpy(ep.type.data,vp->vp_octets, vp->length);
eap_basic_compose(req, &ep);
}
}
* Get the Actual length from the EAP packet
* First EAP-Message contains the EAP packet header
*/
- memcpy(&len, first->strvalue + 2, sizeof(len));
+ memcpy(&len, first->vp_strvalue + 2, sizeof(len));
len = ntohs(len);
/*
/* RADIUS ensures order of attrs, so just concatenate all */
for (vp = first; vp; vp = pairfind(vp->next, PW_EAP_MESSAGE)) {
- memcpy(ptr, vp->strvalue, vp->length);
+ memcpy(ptr, vp->vp_strvalue, vp->length);
ptr += vp->length;
}
}
eap1 = paircreate(type, PW_TYPE_OCTETS);
- memcpy(eap1->strvalue, &e->data[1], len);
+ memcpy(eap1->vp_strvalue, &e->data[1], len);
eap1->length = len;
pairadd(&(rep->vps), eap1);
break;