From patchwork Mon May 17 05:03:49 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Eric Dumazet X-Patchwork-Id: 52755 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 48315B7DB1 for ; Mon, 17 May 2010 15:04:00 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752067Ab0EQFD4 (ORCPT ); Mon, 17 May 2010 01:03:56 -0400 Received: from mail-ww0-f46.google.com ([74.125.82.46]:37745 "EHLO mail-ww0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751716Ab0EQFDz (ORCPT ); Mon, 17 May 2010 01:03:55 -0400 Received: by wwi17 with SMTP id 17so244012wwi.19 for ; Sun, 16 May 2010 22:03:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:cc :in-reply-to:references:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; bh=o0ASu30tzQbI8otdNLflEvaqIaaz6jLJliopgww+D/4=; b=pa4Oh/1p3UrV4B7yiBqWn8vfBGA1j7kHKADWkJ6AkEAww8uK3OTmIRmODx2MD5K5HN OmZIktWQP9bdD7V6oL0UdTPqqUsnyKE+zN6mCcFdjEHHT3T/uZWeEEbluoNdY5aHWo46 FkMUc/8sXfYARSkY8ilbrpnChAhL6MyK76E+M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type:date :message-id:mime-version:x-mailer:content-transfer-encoding; b=LnMC8F2haQ5sQcKooxd/M6FUwhNPgYyFH89zhtaUqHaZZHoYC7ZZfO00yYEcilNbq4 9ogC4UuH4KuVuVGJuf24/Lgw8OjvgR0hcz4U1FALNwyc5zb29xBIXYHbLaaB8YN0RFfy HaepuhPaO3Zc1xBIOstRVi3A9TyzJjvToXs84= Received: by 10.227.129.134 with SMTP id o6mr4261853wbs.111.1274072633392; Sun, 16 May 2010 22:03:53 -0700 (PDT) Received: from [127.0.0.1] ([85.17.35.125]) by mx.google.com with ESMTPS id y22sm37983922wby.23.2010.05.16.22.03.51 (version=SSLv3 cipher=RC4-MD5); Sun, 16 May 2010 22:03:52 -0700 (PDT) Subject: Re: TCP-MD5 checksum failure on x86_64 SMP From: Eric Dumazet To: Bijay Singh Cc: Stephen Hemminger , David Miller , "" , "" , netdev , Ilpo =?ISO-8859-1?Q?J=E4rvinen?= In-Reply-To: References: <1273085598.2367.233.camel@edumazet-laptop> <1273147586.2357.63.camel@edumazet-laptop> <20100506.220443.135536330.davem@davemloft.net> <1273210329.2222.42.camel@edumazet-laptop> <20100507101451.1b4286b7@nehalam> <1273252893.2261.84.camel@edumazet-laptop> <20100507103639.4f1a51fa@nehalam> <1273268446.2325.53.camel@edumazet-laptop> <1273504693.2221.17.camel@edumazet-laptop> <1273611036.2512.18.camel@edumazet-laptop> <1274042939.2299.27.camel@edumazet-laptop> Date: Mon, 17 May 2010 07:03:49 +0200 Message-ID: <1274072629.2299.58.camel@edumazet-laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Le lundi 17 mai 2010 à 03:49 +0000, Bijay Singh a écrit : > I am on quite an old kernel 2.6.27 and could not apply your patches. > > Then i moved on to the kernel 2.6.32.11 however since then I have not been able to bring up my card, this is something i need to fix before i can test you fix. Working on that. > Thanks again for the status report. I see bug is older than what I stated in my previous mail I could reproduce it in my lab and confirm following patch fixes it This is a stable candidate (2.6.27 kernels) Thanks [PATCH] tcp: tcp_synack_options() fix Commit 33ad798c924b4a (tcp: options clean up) introduced a problem if MD5+SACK+timestamps were used in initial SYN message. Some stacks (old linux for example) try to negotiate MD5+SACK+TSTAMP sessions, but since 20 bytes of tcp options space are not enough to store all the bits needed, we chose to disable timestamps in this case. We send a SYN-ACK _without_ timestamp option, but socket has timestamps enabled and all further outgoing messages contain a TS block, all with the initial timestamp of the remote peer. Fix is to really disable timestamps option for the whole session. Reported-by: Bijay Singh Signed-off-by: Eric Dumazet --- net/ipv4/tcp_output.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 0dda86e..b8bb226 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c @@ -667,7 +667,7 @@ static unsigned tcp_synack_options(struct sock *sk, u8 cookie_plus = (xvp != NULL && !xvp->cookie_out_never) ? xvp->cookie_plus : 0; - bool doing_ts = ireq->tstamp_ok; + bool doing_ts; #ifdef CONFIG_TCP_MD5SIG *md5 = tcp_rsk(req)->af_specific->md5_lookup(sk, req); @@ -680,11 +680,12 @@ static unsigned tcp_synack_options(struct sock *sk, * rather than TS in order to fit in better with old, * buggy kernels, but that was deemed to be unnecessary. */ - doing_ts &= !ireq->sack_ok; + ireq->tstamp_ok &= !ireq->sack_ok; } #else *md5 = NULL; #endif + doing_ts = ireq->tstamp_ok; /* We always send an MSS option. */ opts->mss = mss;