[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20190927.204255.1089012302502570397.davem@davemloft.net>
Date: Fri, 27 Sep 2019 20:42:55 +0200 (CEST)
From: David Miller <davem@...emloft.net>
To: edumazet@...gle.com
Cc: netdev@...r.kernel.org, eric.dumazet@...il.com, ycheng@...gle.com,
marek@...udflare.com, jmaxwell37@...il.com
Subject: Re: [PATCH net] tcp: better handle TCP_USER_TIMEOUT in SYN_SENT
state
From: Eric Dumazet <edumazet@...gle.com>
Date: Thu, 26 Sep 2019 15:42:51 -0700
> Yuchung Cheng and Marek Majkowski independently reported a weird
> behavior of TCP_USER_TIMEOUT option when used at connect() time.
>
> When the TCP_USER_TIMEOUT is reached, tcp_write_timeout()
> believes the flow should live, and the following condition
> in tcp_clamp_rto_to_user_timeout() programs one jiffie timers :
>
> remaining = icsk->icsk_user_timeout - elapsed;
> if (remaining <= 0)
> return 1; /* user timeout has passed; fire ASAP */
>
> This silly situation ends when the max syn rtx count is reached.
>
> This patch makes sure we honor both TCP_SYNCNT and TCP_USER_TIMEOUT,
> avoiding these spurious SYN packets.
>
> Fixes: b701a99e431d ("tcp: Add tcp_clamp_rto_to_user_timeout() helper to improve accuracy")
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> Reported-by: Yuchung Cheng <ycheng@...gle.com>
> Reported-by: Marek Majkowski <marek@...udflare.com>
> Cc: Jon Maxwell <jmaxwell37@...il.com>
> Link: https://marc.info/?l=linux-netdev&m=156940118307949&w=2
Applied and queued up for -stable.
Powered by blists - more mailing lists