diff options
author | mohans <mohans@FreeBSD.org> | 2007-02-26 22:25:21 +0000 |
---|---|---|
committer | mohans <mohans@FreeBSD.org> | 2007-02-26 22:25:21 +0000 |
commit | 384aeb29f6100b5e13581c56efdea6d423675769 (patch) | |
tree | 21cfa3a2368a7f712458dfdd8d3485b03c0c6fa7 /sys/netinet/tcp_reass.c | |
parent | 2bd7382fdc16aa04088cebb691546535c56c484b (diff) | |
download | FreeBSD-src-384aeb29f6100b5e13581c56efdea6d423675769.zip FreeBSD-src-384aeb29f6100b5e13581c56efdea6d423675769.tar.gz |
Reap FIN_WAIT_2 connections marked SOCANTRCVMORE faster. This mitigate
potential issues where the peer does not close, potentially leaving
thousands of connections in FIN_WAIT_2. This is controlled by a new sysctl
fast_finwait2_recycle, which is disabled by default.
Reviewed by: gnn, silby.
Diffstat (limited to 'sys/netinet/tcp_reass.c')
-rw-r--r-- | sys/netinet/tcp_reass.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/netinet/tcp_reass.c b/sys/netinet/tcp_reass.c index 298dec1..01f2316 100644 --- a/sys/netinet/tcp_reass.c +++ b/sys/netinet/tcp_reass.c @@ -2301,8 +2301,12 @@ process_ACK: * compressed state. */ if (so->so_rcv.sb_state & SBS_CANTRCVMORE) { + int timeout; + soisdisconnected(so); - callout_reset(tp->tt_2msl, tcp_maxidle, + timeout = (tcp_fast_finwait2_recycle) ? + tcp_finwait2_timeout : tcp_maxidle; + callout_reset(tp->tt_2msl, timeout, tcp_timer_2msl, tp); } tp->t_state = TCPS_FIN_WAIT_2; |