From patchwork Mon Apr 28 17:59:40 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Bizon X-Patchwork-Id: 343555 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 2DD6C14007B for ; Tue, 29 Apr 2014 05:39:35 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933130AbaD1TjV (ORCPT ); Mon, 28 Apr 2014 15:39:21 -0400 Received: from ns.iliad.fr ([212.27.33.1]:56837 "EHLO ns.iliad.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932272AbaD1TjS (ORCPT ); Mon, 28 Apr 2014 15:39:18 -0400 Received: from ns.iliad.fr (localhost [127.0.0.1]) by ns.iliad.fr (Postfix) with ESMTP id AF14F2013C; Mon, 28 Apr 2014 19:59:40 +0200 (CEST) Received: from [192.168.108.17] (freebox.vlq16.iliad.fr [213.36.7.13]) by ns.iliad.fr (Postfix) with ESMTP id 9AD4C20126; Mon, 28 Apr 2014 19:59:40 +0200 (CEST) Message-ID: <1398707980.10880.6.camel@sakura.staff.proxad.net> Subject: Re: problem forwarding IP fragments with DF bit set (caused by ipv4: fix path MTU discovery with connection tracking) From: Maxime Bizon Reply-To: mbizon@freebox.fr To: Patrick McHardy Cc: Eric Dumazet , davem@davemloft.net, netdev Date: Mon, 28 Apr 2014 19:59:40 +0200 In-Reply-To: <1398703056.12635.41.camel@sakura.staff.proxad.net> References: <1398703056.12635.41.camel@sakura.staff.proxad.net> Organization: Freebox X-Mailer: Evolution 3.2.3-0ubuntu6 Mime-Version: 1.0 X-Virus-Scanned: ClamAV using ClamSMTP ; ns.iliad.fr ; Mon Apr 28 19:59:40 2014 +0200 (CEST) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Mon, 2014-04-28 at 18:37 +0200, Maxime Bizon wrote: > > conntrack causes the packets to be re-assembled, but since the > resulting skb now has IP_DF set, it fails the (DF + MTU) test in > ip_forward.c and causes ICMP frag_needed to be sent. hum isn't it just a matter of doing this ? --- a/net/ipv4/ip_fragment.c +++ b/net/ipv4/ip_fragment.c @@ -493,6 +493,8 @@ found: skb->len + ihl > qp->q.max_size) qp->q.max_size = skb->len + ihl; + skb->local_df = 1; + if (qp->q.last_in == (INET_FRAG_FIRST_IN | INET_FRAG_LAST_IN) && qp->q.meat == qp->q.len) { unsigned long orefdst = skb->_skb_refdst;