From owner-freebsd-net Wed Jan 24 10:30:25 2001 Delivered-To: freebsd-net@freebsd.org Received: from implode.root.com (root.com [209.102.106.178]) by hub.freebsd.org (Postfix) with ESMTP id BBA8937B698 for ; Wed, 24 Jan 2001 10:30:06 -0800 (PST) Received: from implode.root.com (localhost [127.0.0.1]) by implode.root.com (8.8.8/8.8.5) with ESMTP id KAA23133; Wed, 24 Jan 2001 10:21:14 -0800 (PST) Message-Id: <200101241821.KAA23133@implode.root.com> To: Luigi Rizzo Cc: net@FreeBSD.ORG Subject: Re: dubious code in ip_output() ? From: David Greenman Reply-To: dg@root.com Date: Wed, 24 Jan 2001 10:21:14 -0800 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >the change attached at the end was applied to ip_output() >long ago -- it checks for room in the interface queue early >in the delivery process -- but does this before passing the packet >to the firewall. > >To me this seems incorrect because the firewall can drop the packet, >divert it to a socket, maybe (not sure) change the output interface, >pass it to a dummynet pipe, etc. > >Maybe none of these things were there at the time this code >was committed, but it sounds like we should remove it now. > >(btw -- we also need to report up errors from dummynet >and divert whenever this is possible... I will also look >into this.) > >Opinions ? The original problem that was being solved is that the code would start queuing fragments of a large packet to the output queue and then notice that it was full and discard the remaining fragments. This resulted in completely useless packet fragments being output on the wire (fragments that would never form a complete packet). You can imagine the various problems that this causes. So the code can't be removed, but it could be moved a bit later, perhaps. It was at the correct location at the time that I wrote it, however. -DG David Greenman Co-founder, The FreeBSD Project - http://www.freebsd.org President, TeraSolutions, Inc. - http://www.terasolutions.com Pave the road of life with opportunities. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message