Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753285AbcL2Qzr (ORCPT ); Thu, 29 Dec 2016 11:55:47 -0500 Received: from shards.monkeyblade.net ([184.105.139.130]:54514 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752982AbcL2Qzp (ORCPT ); Thu, 29 Dec 2016 11:55:45 -0500 Date: Thu, 29 Dec 2016 11:55:43 -0500 (EST) Message-Id: <20161229.115543.1762031328572098632.davem@davemloft.net> To: lizheng043@gmail.com Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, kuznet@ms2.inr.ac.ru, jmorris@namei.org, yoshfuji@linux-ipv6.org, kaber@trash.net, james.z.li@ericsson.com Subject: Re: [PATCH] ipv6: Should use consistent conditional judgement for ip6 fragment between __ip6_append_data and ip6_finish_output From: David Miller In-Reply-To: <1482938626-20151-1-git-send-email-lizheng043@gmail.com> References: <1482938626-20151-1-git-send-email-lizheng043@gmail.com> X-Mailer: Mew version 6.7 on Emacs 25.1 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Thu, 29 Dec 2016 07:56:31 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 934 Lines: 22 From: Zheng Li Date: Wed, 28 Dec 2016 23:23:46 +0800 > From: Zheng Li > > There is an inconsistent conditional judgement between __ip6_append_data > and ip6_finish_output functions, the variable length in __ip6_append_data > just include the length of application's payload and udp6 header, don't > include the length of ipv6 header, but in ip6_finish_output use > (skb->len > ip6_skb_dst_mtu(skb)) as judgement, and skb->len include the > length of ipv6 header. > > That causes some particular application's udp6 payloads whose length are > between (MTU - IPv6 Header) and MTU were fragmented by ip6_fragment even > though the rst->dev support UFO feature. > > Add the length of ipv6 header to length in __ip6_append_data to keep > consistent conditional judgement as ip6_finish_output for ip6 fragment. > > Signed-off-by: Zheng Li Applied, thank you.