From owner-freebsd-current@FreeBSD.ORG Thu Nov 10 17:18:57 2005 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0F0B116A41F; Thu, 10 Nov 2005 17:18:57 +0000 (GMT) (envelope-from sean@mcneil.com) Received: from mail.mcneil.com (mcneil.com [24.199.45.54]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8459E43D55; Thu, 10 Nov 2005 17:18:53 +0000 (GMT) (envelope-from sean@mcneil.com) Received: from localhost (localhost.mcneil.com [127.0.0.1]) by mail.mcneil.com (Postfix) with ESMTP id CA7A6F24F4; Thu, 10 Nov 2005 09:18:52 -0800 (PST) Received: from mail.mcneil.com ([127.0.0.1]) by localhost (triton.mcneil.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 00821-01; Thu, 10 Nov 2005 09:18:51 -0800 (PST) Received: from mcneil.com (mcneil.com [24.199.45.54]) by mail.mcneil.com (Postfix) with ESMTP id 3B3CAF1AF2; Thu, 10 Nov 2005 09:18:51 -0800 (PST) From: Sean McNeil To: SUZUKI Shinsuke In-Reply-To: References: <1131161768.8571.9.camel@server.mcneil.com> <8427EC93-6788-4659-B769-3703FF2AAA9A@mcneil.com> <1131359967.1874.6.camel@server.mcneil.com> <1131424479.1341.3.camel@server.mcneil.com> <20051110024941.GA987@linwhf.opal.com> <1131591746.24065.3.camel@triton.mcneil.com> Content-Type: text/plain Date: Thu, 10 Nov 2005 09:18:50 -0800 Message-Id: <1131643130.1444.2.camel@triton.mcneil.com> Mime-Version: 1.0 X-Mailer: Evolution 2.4.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at mcneil.com X-Mailman-Approved-At: Fri, 11 Nov 2005 03:21:57 +0000 Cc: jr@opal.com, ume@freebsd.org, current@freebsd.org Subject: Re: recent MFC code to 6-STABLE kills ipv6 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Nov 2005 17:18:57 -0000 On Thu, 2005-11-10 at 07:34 -0800, SUZUKI Shinsuke wrote: > Hi, > > >>>>> On Wed, 09 Nov 2005 19:12:58 -0800 > >>>>> suz@freebsd.org(SUZUKI Shinsuke) said: > > > Oh Boy! This is very interesting. I took a look at my ipfw show during > > a ping6 and see the problem. The revpath is messed up. I took out my > > rule: > > add deny all from any to any not verrevpath in via dc0 > > and ping6 now works. > suz> I'll check it from this point of view. > > I think I've found the problem. > Could you please try the following patch? > > If it's okay, I'll commit and MFC it. The patch does indeed allow me to put my revpath check back in ipfw. Thank you so much for all your hard work! Cheers, Sean > ----- > Index: ip_fw2.c > =================================================================== > RCS file: /home/ncvs/src/sys/netinet/ip_fw2.c,v > retrieving revision 1.106.2.4 > diff -u -r1.106.2.4 ip_fw2.c > --- ip_fw2.c 4 Nov 2005 20:26:14 -0000 1.106.2.4 > +++ ip_fw2.c 10 Nov 2005 14:44:06 -0000 > @@ -639,8 +639,14 @@ > if (ro.ro_rt == NULL) > return 0; > > - /* if ifp is provided, check for equality with rtentry */ > - if (ifp != NULL && ro.ro_rt->rt_ifp != ifp) { > + /* > + * if ifp is provided, check for equality with rtentry > + * We should use rt->rt_ifa->ifa_ifp, instead of rt->rt_ifp, > + * to support the case of sending packets to an address of our own. > + * (where the former interface is the first argument of if_simloop() > + * (=ifp), the latter is lo0) > + */ > + if (ifp != NULL && ro.ro_rt->rt_ifa->ifa_ifp != ifp) { > RTFREE(ro.ro_rt); > return 0; > } >