Browse code

Fix mssfix default value in connection_list context

Due to this bug, mssfix hasn't been assigned to fragment value
and used default value (1450) instead. As a consequence, TCP packets
get fragmented, which causes performance penalty.

Since dual stack patch (commit 23d61c56b9fd218c39ad151b01b7e2d6690e6093)
OpenVPN uses options->connection_list, even for single remote.

This fix assigns mssfix value to fragment value for connection_entry
inside connection_list instead of connection_entry inside options struct
(which does not work for connection_list case).

Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <1425587636-23338-1-git-send-email-lstipakov@gmail.com>
URL: http://article.gmane.org/gmane.network.openvpn.devel/9507

Signed-off-by: Gert Doering <gert@greenie.muc.de>

Lev Stipakov authored on 2015/03/06 05:33:56
Showing 1 changed files
... ...
@@ -2352,7 +2352,7 @@ options_postprocess_mutate_ce (struct options *o, struct connection_entry *ce)
2352 2352
     {
2353 2353
 #ifdef ENABLE_FRAGMENT
2354 2354
       if (ce->fragment)
2355
-	o->ce.mssfix = ce->fragment;
2355
+	ce->mssfix = ce->fragment;
2356 2356
 #else
2357 2357
       msg (M_USAGE, "--mssfix must specify a parameter");
2358 2358
 #endif