From owner-freebsd-current@FreeBSD.ORG Thu Nov 10 15:36:19 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 10F1B16A41F; Thu, 10 Nov 2005 15:36:19 +0000 (GMT) (envelope-from suz@alaxala.net) Received: from pc1.alaxala.kame.net (kame219.kame.net [203.178.141.219]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4402743D48; Thu, 10 Nov 2005 15:36:17 +0000 (GMT) (envelope-from suz@alaxala.net) Received: from localhost (localhost [127.0.0.1]) by pc1.alaxala.kame.net (Postfix) with ESMTP id 102E3625C; Fri, 11 Nov 2005 00:37:38 +0900 (JST) Received: from pc1.alaxala.kame.net ([127.0.0.1]) by localhost (pc1.alaxala.kame.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 93227-07; Fri, 11 Nov 2005 00:37:29 +0900 (JST) Received: from flora220.uki-uki.net (unknown [209.52.153.197]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pc1.alaxala.kame.net (Postfix) with ESMTP id CD5A661C6; Fri, 11 Nov 2005 00:37:26 +0900 (JST) Date: Thu, 10 Nov 2005 07:34:53 -0800 Message-ID: From: SUZUKI Shinsuke To: sean@mcneil.com,jr@opal.com X-cite: xcite 1.33 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> User-Agent: Wanderlust/2.15.1 (Almost Unreal) Emacs/22.0 Mule/5.0 (SAKAKI) Organization: Technical Marketing Dept., ALAXALA Networks Corporation MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: amavisd-new at alaxala.kame.net Cc: 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 15:36:19 -0000 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. Thanks, ---- SUZUKI, Shinsuke @ KAME Project ----- 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; }