define MAX_RADIUS_ATTRIBUTE_SIZE

This commit is contained in:
Andreas Steffen 2012-03-09 08:48:46 +01:00
parent 135822e11b
commit 4853efe891
2 changed files with 7 additions and 4 deletions

View File

@ -327,11 +327,12 @@ METHOD(eap_method_t, process, status_t,
data = in->get_data(in);
DBG3(DBG_IKE, "%N payload %B", eap_type_names, this->type, &data);
/* fragment data suitable for RADIUS (not more than 253 bytes) */
while (data.len > 253)
/* fragment data suitable for RADIUS */
while (data.len > MAX_RADIUS_ATTRIBUTE_SIZE)
{
request->add(request, RAT_EAP_MESSAGE, chunk_create(data.ptr, 253));
data = chunk_skip(data, 253);
request->add(request, RAT_EAP_MESSAGE,
chunk_create(data.ptr,MAX_RADIUS_ATTRIBUTE_SIZE));
data = chunk_skip(data, MAX_RADIUS_ATTRIBUTE_SIZE);
}
request->add(request, RAT_EAP_MESSAGE, data);

View File

@ -28,6 +28,8 @@
#include <library.h>
#define MAX_RADIUS_ATTRIBUTE_SIZE 253
typedef struct radius_message_t radius_message_t;
typedef enum radius_message_code_t radius_message_code_t;
typedef enum radius_attribute_type_t radius_attribute_type_t;