From 60536dc2582be5df1642d55150898953249ec2a7 Mon Sep 17 00:00:00 2001 From: Sepherosa Ziehau Date: Wed, 11 Apr 2012 22:07:24 +0800 Subject: [PATCH] tcp/syncache: Increase SYN|ACK max retransmit attempts from 3 to 4 - It matches what the comment says: 15 seconds timeout, if RFC6298 is not enabled. - Add comment about the timeout if RFC6298 is enabled. --- sys/netinet/tcp_syncache.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c index cef5f8b91e..424d2cdddf 100644 --- a/sys/netinet/tcp_syncache.c +++ b/sys/netinet/tcp_syncache.c @@ -151,10 +151,11 @@ static struct syncache *syncookie_lookup(struct in_conninfo *, /* * Transmit the SYN,ACK fewer times than TCP_MAXRXTSHIFT specifies. - * 3 retransmits corresponds to a timeout of (1 + 2 + 4 + 8 == 15) seconds, - * the odds are that the user has given up attempting to connect by then. + * 4 retransmits corresponds to a timeout of (3 + 3 + 3 + 3 + 3 == 15) seconds + * or (1 + 1 + 2 + 4 + 8 == 16) seconds if RFC6298 is used, the odds are that + * the user has given up attempting to connect by then. */ -#define SYNCACHE_MAXREXMTS 3 +#define SYNCACHE_MAXREXMTS 4 /* Arbitrary values */ #define TCP_SYNCACHE_HASHSIZE 512 -- 2.41.0