From patchwork Thu Jun 30 09:19:32 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steffen Klassert X-Patchwork-Id: 102722 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 3F751B6F00 for ; Thu, 30 Jun 2011 19:19:02 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754109Ab1F3JSz (ORCPT ); Thu, 30 Jun 2011 05:18:55 -0400 Received: from a.mx.secunet.com ([195.81.216.161]:51301 "EHLO a.mx.secunet.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752637Ab1F3JSy (ORCPT ); Thu, 30 Jun 2011 05:18:54 -0400 Received: from localhost (alg1 [127.0.0.1]) by a.mx.secunet.com (Postfix) with ESMTP id 9FF861A0080; Thu, 30 Jun 2011 11:17:57 +0200 (CEST) X-Virus-Scanned: by secunet Received: from mail-srv1.secumail.de (unknown [10.53.40.200]) by a.mx.secunet.com (Postfix) with ESMTP id 01A581A007E; Thu, 30 Jun 2011 11:17:57 +0200 (CEST) Received: from gauss.dd.secunet.de ([10.182.7.102]) by mail-srv1.secumail.de with Microsoft SMTPSVC(6.0.3790.4675); Thu, 30 Jun 2011 11:18:52 +0200 Received: by gauss.dd.secunet.de (Postfix, from userid 1000) id 39C3C5C092A; Thu, 30 Jun 2011 11:19:32 +0200 (CEST) Date: Thu, 30 Jun 2011 11:19:32 +0200 From: Steffen Klassert To: David Miller Cc: Herbert Xu , netdev@vger.kernel.org Subject: [PATCH 2/3] ipv4: Don't use ufo handling on later transformed packets Message-ID: <20110630091932.GC13201@secunet.com> References: <20110630091820.GB13201@secunet.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20110630091820.GB13201@secunet.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-OriginalArrivalTime: 30 Jun 2011 09:18:52.0470 (UTC) FILETIME=[BA789D60:01CC3706] Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org We might call ip_ufo_append_data() for packets that will be IPsec transformed later. This function should be used just for real udp packets. So we check for rt->dst.header_len which is only nonzero on IPsec handling and call ip_ufo_append_data() just if rt->dst.header_len is zero. Signed-off-by: Steffen Klassert --- net/ipv4/ip_output.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index 4a7e16b..84f26e8 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c @@ -828,7 +828,7 @@ static int __ip_append_data(struct sock *sk, cork->length += length; if (((length > mtu) || (skb && skb_is_gso(skb))) && (sk->sk_protocol == IPPROTO_UDP) && - (rt->dst.dev->features & NETIF_F_UFO)) { + (rt->dst.dev->features & NETIF_F_UFO) && !rt->dst.header_len) { err = ip_ufo_append_data(sk, queue, getfrag, from, length, hh_len, fragheaderlen, transhdrlen, mtu, flags);