svn commit: r197529 - in stable/7/sys: . contrib/pf netinet

Stanislav Sedov stas at FreeBSD.org
Sat Sep 26 20:07:49 UTC 2009


Author: stas
Date: Sat Sep 26 20:07:48 2009
New Revision: 197529
URL: http://svn.freebsd.org/changeset/base/197529

Log:
  - MFC r196410 by peter@:
     Fix signed comparison bug when ticks goes negative after 24 days of
     uptime.  This causes the tcp time_wait state code to fail to expire
     sockets in timewait state.

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/netinet/tcp_timewait.c

Modified: stable/7/sys/netinet/tcp_timewait.c
==============================================================================
--- stable/7/sys/netinet/tcp_timewait.c	Sat Sep 26 19:00:47 2009	(r197528)
+++ stable/7/sys/netinet/tcp_timewait.c	Sat Sep 26 20:07:48 2009	(r197529)
@@ -587,7 +587,7 @@ tcp_tw_2msl_scan(int reuse)
 	INP_INFO_WLOCK_ASSERT(&tcbinfo);
 	for (;;) {
 		tw = TAILQ_FIRST(&twq_2msl);
-		if (tw == NULL || (!reuse && tw->tw_time > ticks))
+		if (tw == NULL || (!reuse && (tw->tw_time - ticks) > 0))
 			break;
 		INP_WLOCK(tw->tw_inpcb);
 		tcp_twclose(tw, reuse);


More information about the svn-src-all mailing list