Skip to content

Commit

Permalink
tcp: fix get_timewait4_sock() delay computation on 64bit
Browse files Browse the repository at this point in the history
It seems I missed one change in get_timewait4_sock() to compute
the remaining time before deletion of IPV4 timewait socket.

This could result in wrong output in /proc/net/tcp for tm->when field.

Fixes: 96f817f ("tcp: shrink tcp6_timewait_sock by one cache line")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Mar 28, 2014
1 parent 4f647e0 commit e2a1d3e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ipv4/tcp_ipv4.c
Original file line number Diff line number Diff line change
Expand Up @@ -2628,7 +2628,7 @@ static void get_timewait4_sock(const struct inet_timewait_sock *tw,
{
__be32 dest, src;
__u16 destp, srcp;
long delta = tw->tw_ttd - jiffies;
s32 delta = tw->tw_ttd - inet_tw_time_stamp();

dest = tw->tw_daddr;
src = tw->tw_rcv_saddr;
Expand Down

0 comments on commit e2a1d3e

Please sign in to comment.