From owner-freebsd-net Thu Oct 18 17:27:59 2001 Delivered-To: freebsd-net@freebsd.org Received: from boreas.isi.edu (boreas.isi.edu [128.9.160.161]) by hub.freebsd.org (Postfix) with ESMTP id 7873E37B403 for ; Thu, 18 Oct 2001 17:27:56 -0700 (PDT) Received: from isi.edu (hbo.isi.edu [128.9.160.75]) by boreas.isi.edu (8.11.6/8.11.2) with ESMTP id f9J0RrO25251; Thu, 18 Oct 2001 17:27:53 -0700 (PDT) Message-ID: <3BCF7389.9080104@isi.edu> Date: Thu, 18 Oct 2001 17:27:53 -0700 From: Lars Eggert User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:0.9.4) Gecko/20010924 X-Accept-Language: en, de MIME-Version: 1.0 To: Lars Eggert Cc: net@freebsd.org, Yu-Shun Wang Subject: Re: ARP & IP fragments References: <3BCF6A6E.5000302@isi.edu> <3BCF6E50.9080904@isi.edu> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Lars Eggert wrote: > we're seeing a strange thing happening, related to ARP and IP fragments. After a big of poking around, this is due to some code in arpresolve() and how struct llinfo_arp caches packets during lookup, see Stevens Vol. 2, page 699, the comment about lines 292-299. RFC 1122 also covers this. The structure that holds a packet while an ARP lookup for its destination is underway can only hold one packet. The problem is that if multiple packets arrive quickly for that destination, arpresolve() overwrites the cached packet with the last one it saw. For a fragment burst, this always causes the last fragment to be cached and eventually sent. Wouldn't it make more sense to do the ARP lookup before fragmentation, so that the unfragmented packet is cached? This should be OK according to RFC 1122, Section 2.3.2.2, which only specifies that the last of a set of packets to the same destination should be cached. Before fragmentation, there is only one packet... Also, according to the same section of RFC 1122, it should be OK to cache multiple packets here. Lars -- Lars Eggert Information Sciences Institute http://www.isi.edu/larse/ University of Southern California To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message