aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2015-12-24 12:19:23 (GMT)
committerJouni Malinen <j@w1.fi>2015-12-24 12:19:23 (GMT)
commitd745f02e0e52c88caf31eaa18446c53d392372a0 (patch)
treee4f6622cccc210df6f7cb3a44adb52f3088bf29e
parente85bb01998b6fc3dfb53186608d545d68922d9f2 (diff)
downloadhostap-d745f02e0e52c88caf31eaa18446c53d392372a0.zip
hostap-d745f02e0e52c88caf31eaa18446c53d392372a0.tar.gz
hostap-d745f02e0e52c88caf31eaa18446c53d392372a0.tar.bz2
EAP-TNC peer: Allow fragment_size to be configured
Previously, a fixed 1300 fragment_size was hardcoded. Now the EAP profile parameter fragment_size can be used to override this. Signed-off-by: Jouni Malinen <j@w1.fi>
-rw-r--r--src/eap_peer/eap_tnc.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/eap_peer/eap_tnc.c b/src/eap_peer/eap_tnc.c
index 25b9f12..4541b23 100644
--- a/src/eap_peer/eap_tnc.c
+++ b/src/eap_peer/eap_tnc.c
@@ -10,6 +10,7 @@
#include "common.h"
#include "eap_i.h"
+#include "eap_config.h"
#include "tncc.h"
@@ -35,12 +36,16 @@ struct eap_tnc_data {
static void * eap_tnc_init(struct eap_sm *sm)
{
struct eap_tnc_data *data;
+ struct eap_peer_config *config = eap_get_config(sm);
data = os_zalloc(sizeof(*data));
if (data == NULL)
return NULL;
data->state = WAIT_START;
- data->fragment_size = 1300;
+ if (config && config->fragment_size)
+ data->fragment_size = config->fragment_size;
+ else
+ data->fragment_size = 1300;
data->tncc = tncc_init();
if (data->tncc == NULL) {
os_free(data);