|
| | Subject: | timewait state memory leak | | Group: | Freebsd-net | | From: | Huang, Yusheng | | Date: | 5 May 2008 |
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
_______________________________________________
freebsd-net mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscribe"
|