From owner-freebsd-net@FreeBSD.ORG Thu Mar 19 12:53:50 2015 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 007C749E for ; Thu, 19 Mar 2015 12:53:49 +0000 (UTC) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B2E8FCE7 for ; Thu, 19 Mar 2015 12:53:49 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 0FE131FE023; Thu, 19 Mar 2015 13:53:46 +0100 (CET) Message-ID: <550AC709.1050404@selasky.org> Date: Thu, 19 Mar 2015 13:54:33 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Emeric POUPON , freebsd-net Subject: Re: Fragment questions References: <522774578.25519037.1426765109046.JavaMail.zimbra@stormshield.eu> In-Reply-To: <522774578.25519037.1426765109046.JavaMail.zimbra@stormshield.eu> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Mar 2015 12:53:50 -0000 On 03/19/15 12:38, Emeric POUPON wrote: > Hello, > > I noticed two questionable things in the fragmentation code: > - in ip_fragment, we do not copy the flowid from the original mbuf to the fragmented mbuf. Therefore we may output very desynchronized fragments (first fragment emitted far later the second fragment, etc.) > - in the ip_newid macro, we do "htons(V_ip_id++))" if we do not use randomized id. In multi core systems, we may emit successive packets with the same id. > > Both problems combined lead to bad packet reassembly on the remote host. > > What do you think? > Hi, I think this issue is already fixed: https://svnweb.freebsd.org/base/head/sys/netinet/ip_output.c?revision=278103&view=markup --HPS