From: Etienne Dechamps Date: Sun, 15 Mar 2015 18:01:03 +0000 (+0000) Subject: Increase the ReplayWindow default from 16 to 32. X-Git-Tag: release-1.1pre12~185^2 X-Git-Url: https://git.tinc-vpn.org/git/browse?a=commitdiff_plain;h=7027bba541eca3e34f689bebd6f6e408ba4e7710;p=tinc Increase the ReplayWindow default from 16 to 32. As a rule, it seems reasonable to make sure that tinc operates correctly on at least 1G links, since these are pretty common. However, I have observed replay window issues when operating at speeds of 600 Mbit/s and above, especially when the receiving end is a Windows system (not sure why). This commit increases the default so that this won't occur on fresh setups. --- diff --git a/doc/tinc.conf.5.in b/doc/tinc.conf.5.in index 2ba10124..9e5c0256 100644 --- a/doc/tinc.conf.5.in +++ b/doc/tinc.conf.5.in @@ -464,10 +464,10 @@ and .Ev REMOTEPORT are available. .El -.It Va ReplayWindow Li = Ar bytes Pq 16 +.It Va ReplayWindow Li = Ar bytes Pq 32 This is the size of the replay tracking window for each remote node, in bytes. The window is a bitfield which tracks 1 packet per bit, so for example -the default setting of 16 will track up to 128 packets in the window. In high +the default setting of 32 will track up to 256 packets in the window. In high bandwidth scenarios, setting this to a higher value can reduce packet loss from the interaction of replay tracking with underlying real packet loss and/or reordering. Setting this to zero will disable replay tracking completely and diff --git a/doc/tinc.texi b/doc/tinc.texi index 3694d6da..55560f4a 100644 --- a/doc/tinc.texi +++ b/doc/tinc.texi @@ -1207,10 +1207,10 @@ The environment variables @env{NAME}, @env{NODE}, @env{REMOTEADDRES} and @env{RE @end table @cindex ReplayWindow -@item ReplayWindow = (16) +@item ReplayWindow = (32) This is the size of the replay tracking window for each remote node, in bytes. The window is a bitfield which tracks 1 packet per bit, so for example -the default setting of 16 will track up to 128 packets in the window. In high +the default setting of 32 will track up to 256 packets in the window. In high bandwidth scenarios, setting this to a higher value can reduce packet loss from the interaction of replay tracking with underlying real packet loss and/or reordering. Setting this to zero will disable replay tracking completely and diff --git a/src/net_packet.c b/src/net_packet.c index 8dba3258..b05dd16f 100644 --- a/src/net_packet.c +++ b/src/net_packet.c @@ -64,7 +64,7 @@ static char lzo_wrkmem[LZO1X_999_MEM_COMPRESS > LZO1X_1_MEM_COMPRESS ? LZO1X_999 static void send_udppacket(node_t *, vpn_packet_t *); -unsigned replaywin = 16; +unsigned replaywin = 32; bool localdiscovery = true; bool udp_discovery = true; int udp_discovery_keepalive_interval = 10;