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>
This commit is contained in:
parent
e85bb01998
commit
d745f02e0e
1 changed files with 6 additions and 1 deletions
|
@ -10,6 +10,7 @@
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "eap_i.h"
|
#include "eap_i.h"
|
||||||
|
#include "eap_config.h"
|
||||||
#include "tncc.h"
|
#include "tncc.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -35,12 +36,16 @@ struct eap_tnc_data {
|
||||||
static void * eap_tnc_init(struct eap_sm *sm)
|
static void * eap_tnc_init(struct eap_sm *sm)
|
||||||
{
|
{
|
||||||
struct eap_tnc_data *data;
|
struct eap_tnc_data *data;
|
||||||
|
struct eap_peer_config *config = eap_get_config(sm);
|
||||||
|
|
||||||
data = os_zalloc(sizeof(*data));
|
data = os_zalloc(sizeof(*data));
|
||||||
if (data == NULL)
|
if (data == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
data->state = WAIT_START;
|
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();
|
data->tncc = tncc_init();
|
||||||
if (data->tncc == NULL) {
|
if (data->tncc == NULL) {
|
||||||
os_free(data);
|
os_free(data);
|
||||||
|
|
Loading…
Reference in a new issue