From f4626235de4b6d19c7399a2522241f7c43e0caf6 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 11 May 2014 20:53:41 +0300 Subject: [PATCH] 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 --- src/eap_server/eap_server_pwd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/eap_server/eap_server_pwd.c b/src/eap_server/eap_server_pwd.c index 5d67c8213..ec53481fc 100644 --- a/src/eap_server/eap_server_pwd.c +++ b/src/eap_server/eap_server_pwd.c @@ -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; }