]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Change a few members of tcpcb that store cached copies of ticks to be ints
authorjhb <jhb@FreeBSD.org>
Wed, 10 Jun 2009 18:27:15 +0000 (18:27 +0000)
committerjhb <jhb@FreeBSD.org>
Wed, 10 Jun 2009 18:27:15 +0000 (18:27 +0000)
commitd5b1c989db5b483fe2477ae36578b86fdf9c463b
tree48fe4306e8a4063e8c95c2e285ba8698ff9c0139
parent255b5eca7a5c5d2a3d7130d8cc76dd8f0122408b
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
sys/netinet/tcp_input.c
sys/netinet/tcp_usrreq.c
sys/netinet/tcp_var.h