Date: Mon, 5 May 2008 11:53:11 -0700 From: "Huang, Yusheng" <yusheng.huang@bluecoat.com> To: <freebsd-net@freebsd.org> Subject: timewait state memory leak Message-ID: <B583FBF374231F4A89607B4D08578A43B0F8F4@bcs-mail03.internal.cacheflow.com>
next in thread | raw e-mail | index | archive | help
Hi,
I am looking at the tcp_tw_2msl_scan() code and it looks like there is a
bug in there.
struct tcptw *
tcp_tw_2msl_scan(int reuse)
{
struct tcptw *tw;
INP_INFO_WLOCK_ASSERT(&tcbinfo);
for (;;) {
tw = TAILQ_FIRST(&twq_2msl);
if (tw == NULL || (!reuse && tw->tw_time > ticks))
^^^^^^^^^^^^^^^^^^
break;
INP_WLOCK(tw->tw_inpcb);
tcp_twclose(tw, reuse);
if (reuse)
return (tw);
}
return (NULL);
}
Shouldn't the comparison be TSTMP_GT(tw->tw_time, ticks)?
-yusheng
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?B583FBF374231F4A89607B4D08578A43B0F8F4>
