svn commit: r193941 - head/sys/netinet

John Baldwin jhb at
Thu Jun 11 14:22:26 UTC 2009

On Wednesday 10 June 2009 3:52:31 pm Robert Watson wrote:
> On Wed, 10 Jun 2009, John Baldwin wrote:
> >  Change a few members of tcpcb that store cached copies of ticks to be ints
> >  instead of unsigned longs.  This fixes a few overflow edge cases on 64-bit
> >  platforms.  Specifically, if an idle connection receives a packet shortly
> >  before 2^31 clock ticks of uptime (about 25 days with hz=1000) and the keep
> >  alive timer fires after 2^31 clock ticks, the keep alive timer will think
> >  that the connection has been idle for a very long time and will immediately
> >  drop the connection instead of sending a keep alive probe.
> >
> >  Reviewed by:	silby, gnn, lstewart
> >  MFC after:	1 week
> That's pretty subtle even as TCP bugs go, nice work :-).

More of the credit goes to gnn@ and my co-workers.  I had told gnn@ to not worry
about overflow about a week ago because I had just assumed (incorrectly) that
'ticks' and 't_rcvtime' were the same size. :-/

John Baldwin

More information about the svn-src-all mailing list