EAP-pwd server: Allow fragment_size to be configured

Previously, the fragment_size parameter was ignored and the default
value of 1020 was hardcoded.

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2014-05-11 20:53:41 +03:00
parent 47a74ad81a
commit f4626235de

View file

@ -124,7 +124,8 @@ static void * eap_pwd_init(struct eap_sm *sm)
data->in_frag_pos = data->out_frag_pos = 0;
data->inbuf = data->outbuf = NULL;
data->mtu = 1020; /* default from RFC 5931, make it configurable! */
/* use default MTU from RFC 5931 if not configured otherwise */
data->mtu = sm->fragment_size > 0 ? sm->fragment_size : 1020;
return data;
}