diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 4e00442..607d675 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c @@ -415,7 +415,10 @@ static void tcp_options_write(__be32 *ptr, struct tcp_sock *tp, (TCPOPT_TIMESTAMP << 8) | TCPOLEN_TIMESTAMP); } - *ptr++ = htonl(opts->tsval); + /* Currently, opts->tsval always comes from tcp_time_stamp. + * Thus, if zero, its caused by jiffie wrap-around, and we can + * approximate it to one to avoid a later TSecr drop */ + *ptr++ = htonl(opts->tsval?:1); *ptr++ = htonl(opts->tsecr); }