From owner-freebsd-net Fri Feb 22 8:32:33 2002 Delivered-To: freebsd-net@freebsd.org Received: from shuttle.wide.toshiba.co.jp (shuttle.wide.toshiba.co.jp [202.249.10.124]) by hub.freebsd.org (Postfix) with ESMTP id B4EB937B402 for ; Fri, 22 Feb 2002 08:32:27 -0800 (PST) Received: from localhost ([3ffe:501:4819:2000:b58f:942d:88f8:e401]) by shuttle.wide.toshiba.co.jp (8.11.6/8.9.1) with ESMTP id g1MGWOo88447; Sat, 23 Feb 2002 01:32:24 +0900 (JST) Date: Sat, 23 Feb 2002 01:32:22 +0900 Message-ID: From: JINMEI Tatuya / =?ISO-2022-JP?B?GyRCP0BMQEMjOkgbKEI=?= To: Ross Finlayson Cc: freebsd-net@FreeBSD.ORG Subject: Re: nd6_rtrequest: bad gateway value: stf0 In-Reply-To: <4.3.1.1.20020216130038.00babc30@localhost> References: <4.3.1.1.20020216130038.00babc30@localhost> User-Agent: Wanderlust/2.7.5 (Too Funky) Emacs/21.1 Mule/5.0 (SAKAKI) Organization: Research & Development Center, Toshiba Corp., Kawasaki, Japan. MIME-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII X-Dispatcher: imput version 980905(IM100) Lines: 48 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 >>>>> On Sat, 16 Feb 2002 13:16:40 -0800, >>>>> Ross Finlayson said: > I have tried to configure my system (FreeBSD 4.5-STABLE) for 6to4, using > the "stf" interface, but am getting the error message "nd6_rtrequest: bad > gateway value: stf0" in my log, whenever I try to 'ping6' a remote IPv6 > address. This seems to be a bug in the kernel. Could you try the attached patch (which is for FreeBSD 4.5 RELEASE)? JINMEI, Tatuya Communication Platform Lab. Corporate R&D Center, Toshiba Corp. jinmei@isl.rdc.toshiba.co.jp *** nd6.c.orig Sat Feb 23 01:29:42 2002 --- nd6.c Sat Feb 23 01:29:58 2002 *************** *** 1112,1117 **** --- 1112,1138 ---- return; } + if (req == RTM_RESOLVE && + (nd6_need_cache(ifp) == 0 || /* stf case */ + !nd6_is_addr_neighbor((struct sockaddr_in6 *)rt_key(rt), ifp))) { + /* + * FreeBSD and BSD/OS often make a cloned host route based + * on a less-specific route (e.g. the default route). + * If the less specific route does not have a "gateway" + * (this is the case when the route just goes to a p2p or an + * stf interface), we'll mistakenly make a neighbor cache for + * the host route, and will see strange neighbor solicitation + * for the corresponding destination. In order to avoid the + * confusion, we check if the destination of the route is + * a neighbor in terms of neighbor discovery, and stop the + * process if not. Additionally, we remove the LLINFO flag + * so that ndp(8) will not try to get the neighbor information + * of the destination. + */ + rt->rt_flags &= ~RTF_LLINFO; + return; + } + switch (req) { case RTM_ADD: /* To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message