From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net] tcp: do not restart timewait timer on rst reception Date: Fri, 31 Aug 2018 23:11:32 -0700 (PDT) Message-ID: <20180831.231132.2010294491856406070.davem@davemloft.net> References: <20180830122429.3546-1-fw@strlen.de> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, edumazet@google.com To: fw@strlen.de Return-path: Received: from shards.monkeyblade.net ([23.128.96.9]:44070 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726044AbeIAKWW (ORCPT ); Sat, 1 Sep 2018 06:22:22 -0400 In-Reply-To: <20180830122429.3546-1-fw@strlen.de> Sender: netdev-owner@vger.kernel.org List-ID: From: Florian Westphal Date: Thu, 30 Aug 2018 14:24:29 +0200 > RFC 1337 says: > ''Ignore RST segments in TIME-WAIT state. > If the 2 minute MSL is enforced, this fix avoids all three hazards.'' > > So with net.ipv4.tcp_rfc1337=1, expected behaviour is to have TIME-WAIT sk > expire rather than removing it instantly when a reset is received. > > However, Linux will also re-start the TIME-WAIT timer. > > This causes connect to fail when tying to re-use ports or very long > delays (until syn retry interval exceeds MSL). ... > Without this patch, 'ss' shows restarts of tw timer and last packet is > thus just another pure ack, more than one minute later. > > This restores the original code from commit 283fd6cf0be690a83 > ("Merge in ANK networking jumbo patch") in netdev-vger-cvs.git . > > For some reason the else branch was removed/lost in 1f28b683339f7 > ("Merge in TCP/UDP optimizations and [..]") and timer restart became > unconditional. > > Reported-by: Michal Tesar > Signed-off-by: Florian Westphal Applied and thanks for the packet drill test case :-)