From owner-freebsd-net@FreeBSD.ORG Mon Oct 2 08:19:31 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0946416A412 for ; Mon, 2 Oct 2006 08:19:31 +0000 (UTC) (envelope-from jinmei@isl.rdc.toshiba.co.jp) Received: from shuttle.wide.toshiba.co.jp (shuttle.wide.toshiba.co.jp [202.249.10.124]) by mx1.FreeBSD.org (Postfix) with ESMTP id AAC2643D55 for ; Mon, 2 Oct 2006 08:19:17 +0000 (GMT) (envelope-from jinmei@isl.rdc.toshiba.co.jp) Received: from impact.jinmei.org (unknown [2001:200:1b1:1010:20e:7bff:fedd:fe03]) by shuttle.wide.toshiba.co.jp (Postfix) with ESMTP id 179611521A; Mon, 2 Oct 2006 17:19:15 +0900 (JST) Date: Mon, 02 Oct 2006 17:19:12 +0900 Message-ID: From: JINMEI Tatuya / =?ISO-2022-JP?B?GyRCP0BMQEMjOkgbKEI=?= To: John Hay In-Reply-To: <20060908161514.GA42016@zibbi.meraka.csir.co.za> References: <20060907100944.GA68587@zibbi.meraka.csir.co.za> <20060907141019.91998.qmail@web26604.mail.ukl.yahoo.com> <20060908161514.GA42016@zibbi.meraka.csir.co.za> User-Agent: Wanderlust/2.14.0 (Africa) Emacs/21.3 Mule/5.0 (SAKAKI) Organization: Research & Development Center, Toshiba Corp., Kawasaki, Japan. MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Cc: freebsd-net@freebsd.org Subject: Re: ipv6 host routes X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Oct 2006 08:19:31 -0000 >>>>> On Fri, 8 Sep 2006 18:15:14 +0200, >>>>> John Hay said: > With this and my FreeBSD/IPv6 port of olsrd I can run multiple wireless > interfaces with the same IPv6 subnet and olsrd can make it all work. I should have looked at it much earlier (sorry about the delay), but I don't this change is correct. This will easily bother statically installed route (especially) on a point-to-point interface. There seem to be some try-and-errors in the CURRENT branch, but even the latest revision (1.69) has a bad side-effect. For example, if you statically install the following *host* route # route add -inet6 2001:db8::abcd -host -interface gif0 the latest revision of kernel will eventually remove it due to unreachability detection, which is unlikely what the administrator wanted to see. The key point here is whether the route is statically created or not. And, if I understand your intent correctly, the host route you want to install is not really "static" in that it can (or should) be removed when it's detected to be unreachable, right? If so, the correct change to the kernel is the patch attached below (it's against RELENG_6 as of today, which is rev. 1.48.2.14). JINMEI, Tatuya Communication Platform Lab. Corporate R&D Center, Toshiba Corp. jinmei@isl.rdc.toshiba.co.jp Index: nd6.c =================================================================== RCS file: /home/ncvs/src/sys/netinet6/nd6.c,v retrieving revision 1.48.2.14 diff -u -r1.48.2.14 nd6.c --- nd6.c 20 Sep 2006 19:10:18 -0000 1.48.2.14 +++ nd6.c 2 Oct 2006 08:17:30 -0000 @@ -1315,7 +1315,7 @@ callout_init(&ln->ln_timer_ch, 0); /* this is required for "ndp" command. - shin */ - if (req == RTM_ADD) { + if (req == RTM_ADD && (rt->rt_flags & RTF_STATIC)) { /* * gate should have some valid AF_LINK entry, * and ln->ln_expire should have some lifetime @@ -1392,8 +1392,6 @@ ip6_sprintf(&llsol), error)); } } - } else if (req == RTM_ADD && SDL(gate)->sdl_alen == 0) { - ln->ln_state = ND6_LLINFO_INCOMPLETE; } break;