Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4ab68879 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller
Browse files

tcp: fix tcp_probe_timer() for TCP_USER_TIMEOUT



TCP_USER_TIMEOUT is still converted to jiffies value in
icsk_user_timeout

So we need to make a conversion for the cases HZ != 1000

Fixes: 9a568de4 ("tcp: switch TCP TS option (RFC 7323) to 1ms clock")
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Acked-by: default avatarSoheil Hassas Yeganeh <soheil@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0a9fc39e
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -341,7 +341,8 @@ static void tcp_probe_timer(struct sock *sk)
	if (!start_ts)
		tcp_send_head(sk)->skb_mstamp = tp->tcp_mstamp;
	else if (icsk->icsk_user_timeout &&
		 (s32)(tcp_time_stamp(tp) - start_ts) > icsk->icsk_user_timeout)
		 (s32)(tcp_time_stamp(tp) - start_ts) >
		 jiffies_to_msecs(icsk->icsk_user_timeout))
		goto abort;

	max_probes = sock_net(sk)->ipv4.sysctl_tcp_retries2;