From patchwork Thu Sep 3 16:25:53 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cosmin Ratiu X-Patchwork-Id: 32901 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@bilbo.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id C93E0B6F2B for ; Fri, 4 Sep 2009 02:24:43 +1000 (EST) Received: by ozlabs.org (Postfix) id B58EFDDD0B; Fri, 4 Sep 2009 02:24:43 +1000 (EST) Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 49065DDD01 for ; Fri, 4 Sep 2009 02:24:43 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755987AbZICQYe (ORCPT ); Thu, 3 Sep 2009 12:24:34 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755975AbZICQYe (ORCPT ); Thu, 3 Sep 2009 12:24:34 -0400 Received: from ixro-out-rtc.ixiacom.com ([92.87.192.98]:13057 "EHLO ixro-ex1.ixiacom.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755974AbZICQYd (ORCPT ); Thu, 3 Sep 2009 12:24:33 -0400 Received: from ixro-cratiu.localnet ([10.205.9.78]) by ixro-ex1.ixiacom.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 3 Sep 2009 19:24:34 +0300 Subject: [PATCH] ipv6: Fix tcp_v6_send_response(): it didn't set skb transport header From: Cosmin Ratiu Organization: IXIA To: netdev@vger.kernel.org Date: Thu, 3 Sep 2009 19:25:53 +0300 MIME-Version: 1.0 Message-Id: <200909031925.54197.cratiu@ixiacom.com> X-OriginalArrivalTime: 03 Sep 2009 16:24:34.0644 (UTC) FILETIME=[06175140:01CA2CB3] Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Hello, Here is a patch which fixes an issue observed when using TCP over IPv6 and AH from IPsec. When a connection gets closed the 4-way method and the last ACK from the server gets dropped, the subsequent FINs from the client do not get ACKed because tcp_v6_send_response does not set the transport header pointer. This causes ah6_output to try to allocate a lot of memory, which typically fails, so the ACKs never make it out of the stack. I have reproduced the problem on kernel 2.6.7, but after looking at the latest kernel it seems the problem is still there. Cosmin. Signed-off-by: Cosmin Ratiu --- net/ipv6/tcp_ipv6.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index d849dd5..776e911 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c @@ -1003,6 +1003,7 @@ static void tcp_v6_send_response(struct sk_buff *skb, u32 seq, u32 ack, u32 win, skb_reserve(buff, MAX_HEADER + sizeof(struct ipv6hdr) + tot_len); t1 = (struct tcphdr *) skb_push(buff, tot_len); + skb_reset_transport_header(skb); /* Swap the send and the receive. */ memset(t1, 0, sizeof(*t1));