From owner-freebsd-net Fri Aug 3 10:22:17 2001 Delivered-To: freebsd-net@freebsd.org Received: from purus.tcoip (cerberus.tcoip.com.br [200.220.254.3]) by hub.freebsd.org (Postfix) with ESMTP id 0B4DC37B40F; Fri, 3 Aug 2001 10:22:13 -0700 (PDT) (envelope-from daniel.sobral@tcoip.com.br) Received: from tcoip.com.br (sntt48v0q7osivhf@dcs.intra.tcoip.com.br [192.168.60.194]) by purus.tcoip (8.11.1/8.11.1) with ESMTP id f73HKoA05464; Fri, 3 Aug 2001 14:20:50 -0300 Message-ID: <3B6ADD66.8010009@tcoip.com.br> Date: Fri, 03 Aug 2001 14:20:38 -0300 From: "Daniel C. Sobral" User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:0.9.2) Gecko/20010705 X-Accept-Language: en, pt-br, ja MIME-Version: 1.0 To: Bill Fenner Cc: ru@FreeBSD.org, bde@zeta.org.au, kris@obsecurity.org, dcs@FreeBSD.org, net@FreeBSD.org, Ian Dowse Subject: Re: cvs commit: src/sys/netinet ip_output.c References: <200107190710.f6J7AVl44738@freefall.freebsd.org> <20010719011806.A28830@xor.obsecurity.org> <20010719135423.G69276@sunbay.com> <200108031612.JAA18086@windsor.research.att.com> 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 Bill Fenner wrote: >>@@ -964,7 +957,7 @@ sendorfree: >> /* clean ipsec history once it goes out of the node */ >> ipsec_delaux(m); >>#endif >>- if (error == 0) { >>+ if (error == 0 && ia) { >> /* Record statistics for this interface address. */ >> ia->ia_ifa.if_opackets++; >> ia->ia_ifa.if_obytes += m->m_pkthdr.len; >> > > Sorry I missed this the first time we went through this. Putting the && > ia here causes fragmented packets sent on interfaces without addresses to > not be sent -- which is not really the right plan. I think the if (ia) > belongs around the stats updates, but not around the ifp_output() call. > > Testing should include something like "% ping -I 0.0.0.1 -s 2000 > 224.0.0.1" (where the "1" is the ifindex of an up multicast-capable > interface with no source address and "2000" is larger than its MTU), > and running tcpdump to make sure those packets make it out. Heh. I checked past revisions and discovered the correct tests were put in stable on revision 1.99.2.13, by Ian, but were never a part of current. I'll be merging this from stable. -- Daniel C. Sobral (8-DCS) Daniel.Sobral@tcoip.com.br dcs@newsguy.com dcs@freebsd.org capo@notorious.bsdconspiracy.net Show me a man who is a good loser and I'll show you a man who is playing golf with his boss. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message