aboutsummaryrefslogtreecommitdiffstats
path: root/src/eap_server
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2014-05-11 17:53:41 (GMT)
committerJouni Malinen <j@w1.fi>2014-05-11 19:47:25 (GMT)
commitf4626235de4b6d19c7399a2522241f7c43e0caf6 (patch)
tree9b2f8643e55eda0ab2dbe76a46da8b9fe1b0ce42 /src/eap_server
parent47a74ad81a7e7d77b933966f0e0764531ac70825 (diff)
downloadhostap-f4626235de4b6d19c7399a2522241f7c43e0caf6.zip
hostap-f4626235de4b6d19c7399a2522241f7c43e0caf6.tar.gz
hostap-f4626235de4b6d19c7399a2522241f7c43e0caf6.tar.bz2
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>
Diffstat (limited to 'src/eap_server')
-rw-r--r--src/eap_server/eap_server_pwd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/eap_server/eap_server_pwd.c b/src/eap_server/eap_server_pwd.c
index 5d67c82..ec53481 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;
}