]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
EAP-pwd server: Allow fragment_size to be configured
authorJouni Malinen <j@w1.fi>
Sun, 11 May 2014 17:53:41 +0000 (20:53 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 11 May 2014 19:47:25 +0000 (22:47 +0300)
Previously, the fragment_size parameter was ignored and the default
value of 1020 was hardcoded.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/eap_server/eap_server_pwd.c

index 5d67c8213029b9c9d6429941c3cf2e58165cc7b1..ec53481fc0e7d44617b6605924de0d6e6856eb69 100644 (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;
 }