From owner-freebsd-net@FreeBSD.ORG Mon Oct 2 11:56:13 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 CF71A16A415 for ; Mon, 2 Oct 2006 11:56:13 +0000 (UTC) (envelope-from jhay@meraka.csir.co.za) Received: from zibbi.meraka.csir.co.za (zibbi.meraka.csir.co.za [146.64.24.58]) by mx1.FreeBSD.org (Postfix) with ESMTP id 15E5A43D46 for ; Mon, 2 Oct 2006 11:56:11 +0000 (GMT) (envelope-from jhay@meraka.csir.co.za) Received: by zibbi.meraka.csir.co.za (Postfix, from userid 3973) id 7B33933C82; Mon, 2 Oct 2006 13:56:06 +0200 (SAST) Date: Mon, 2 Oct 2006 13:56:06 +0200 From: John Hay To: "JINMEI Tatuya / ?$B?@L@C#:H" Message-ID: <20061002115606.GA14698@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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i 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 11:56:13 -0000 On Mon, Oct 02, 2006 at 05:19:12PM +0900, JINMEI Tatuya / ?$B?@L@C#:H wrote: > 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. No problem if I can get your help now. :-) > 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? Maybe I should state what I want to achieve again. What I'm trying to do is to add a host route to a machine directly connected. It sounds stupid because you normally don't need it, but I'm busy porting net/olsrd to FreeBSD/IPv6. Currently it only have linux ipv6 support. Olsrd is a mesh routing protocol used in adhoc wireless networks. The one reason you want to add these routes is because you might have more than one wireless interface on the same subnet, covering different areas. So you need to add a route to the interface that can talk to the host. So after some struggling and questions on freebsd-net, I came up with code that do the equivalent of: "route add -inet6 -interface -ifp -llinfo -nostatic" in olsrd and this patch. If there is an easier way, I would love to use it. I would have liked if something simple like "route add -inet6 -interface " did work on "normal" interfaces like ethernet and wireless interfaces too. Olsrd will remove the route again when it isn't needed or correct anymore, so there is no need for it to be removed by the OS. It probably shouldn't be marked static either because routing deamons do not normally do that. John -- John Hay -- John.Hay@meraka.csir.co.za / jhay@FreeBSD.org