From owner-cvs-all Fri Aug 3 16: 1:44 2001 Delivered-To: cvs-all@freebsd.org Received: from newsguy.com (smtp.newsguy.com [209.155.56.71]) by hub.freebsd.org (Postfix) with ESMTP id C97CB37B406; Fri, 3 Aug 2001 16:01:33 -0700 (PDT) (envelope-from dcs@newsguy.com) Received: from newsguy.com (ppp045-bsace7001.telebrasilia.net.br [200.181.80.45]) by newsguy.com (8.9.1a/8.9.1) with ESMTP id QAA93925; Fri, 3 Aug 2001 16:01:20 -0700 (PDT) Message-ID: <3B6B2E0C.2E83062D@newsguy.com> Date: Fri, 03 Aug 2001 20:04:44 -0300 From: "Daniel C. Sobral" X-Mailer: Mozilla 4.77 [en] (Win98; U) X-Accept-Language: en,pt-BR,pt,en-GB,en-US,ja MIME-Version: 1.0 To: Ian Dowse Cc: "Daniel C. Sobral" , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/netinet ip_output.c References: <200108032234.aa06871@salmon.maths.tcd.ie> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Ian Dowse wrote: > > In message <200108031736.f73Ha7Q52998@freefall.freebsd.org>, "Daniel C. Sobral" > writes: > > MFS: Avoid dropping fragments in the absence of an interface address. > > > > Noticed by: fenner > > Submitted by: iedowse > > Not committed to current by: iedowse ;-) > > Hey, that's a little unfair :-) I was fixing a real problem in That's why I put a smile there. If it was fair, no smile would be required. :-) > ip_input just before 4.3-RELEASE, where `ia' wasn't always initialised > before being dereferenced. As I didn't analyse every possible code > path to ip_output, I added some sanity checks to catch the case of > `ia' being NULL even though this "couldn't happen" according to > the surrounding code. It seems that those cases really cannot > happen, so the sanity checks are never triggered. > > Since then however, revision 1.29 introduced a case where ia could That was me. > become NULL, and revision 1.131 "fixed" this case by completely > dropping the fragment if ia is NULL. This revision (1.132) backs That was ru fixing after me, but making a small mistake while at it. > out part of 1.131: > > 1.31: > - if (error == 0) { > + if (error == 0 && ia) { > ... > error = (*ifp->if_output)(ifp, m, ... > } else > m_freem(m); > > 1.32: > - if (error == 0 && ia) { > + if (error == 0) { > ... > error = (*ifp->if_output)(ifp, m, ... > } else > m_freem(m); > > and it adds a (now necessary) test that just happens to result in > similar code to that in -stable; however it is avoiding a case that > can happen instead of one that can't. I hope it's the same, and it sure as hell didn't "just happen", as I modeled it after what you did. :-) -- Daniel C. Sobral (8-DCS) dcs@newsguy.com dcs@freebsd.org capo@the.secret.bsdconspiracy.net wow regex humor... I'm a geek To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message