Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Sep 2006 19:28:24 +0200
From:      John Hay <jhay@meraka.org.za>
To:        Hajimu UMEMOTO <ume@FreeBSD.org>
Cc:        John Hay <jhay@FreeBSD.org>, src-committers@FreeBSD.org, cvs-all@FreeBSD.org, cvs-src@FreeBSD.org
Subject:   Re: cvs commit: src/sys/netinet6 nd6.c
Message-ID:  <20060930172824.GA61082@zibbi.meraka.csir.co.za>
In-Reply-To: <ygeven51en2.wl%ume@mahoroba.org>
References:  <200609301408.k8UE8vpM069161@repoman.freebsd.org> <ygewt7l1l1c.wl%ume@mahoroba.org> <20060930162039.GA59699@zibbi.meraka.csir.co.za> <ygeven51en2.wl%ume@mahoroba.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Oct 01, 2006 at 01:51:45AM +0900, Hajimu UMEMOTO wrote:
> jhay> On Sat, Sep 30, 2006 at 11:33:35PM +0900, Hajimu UMEMOTO wrote:
> > jhay>   FreeBSD src repository
> > 
> > jhay>   Modified files:
> > jhay>     sys/netinet6         nd6.c 
> > jhay>   Log:
> > jhay>   My previous commit broke "route add -inet6 <network_addr> -interface gif0".
> > jhay>   Fix that by excluding point-to-point interfaces.
> >   
> > > -		} else if (req == RTM_ADD && SDL(gate)->sdl_alen == 0) {
> > > +		} else if (req == RTM_ADD && SDL(gate)->sdl_alen == 0 &&
> > > +		    (ifp->if_flags & (IFF_POINTOPOINT | IFF_LOOPBACK)) == 0) {
> > > 			ln->ln_state = ND6_LLINFO_INCOMPLETE;
> > 
> > Umm, it seems still there is a problem.  We are using -interface not
> > only for point-to-point interface and loopback.
> > I'm not sure but can we check `(rt->rt_flags & RTF_HOST) != 0', here?
> 
> jhay> That would work better yes. Is there a reason you feel unsure about it?
> jhay> Or is it just a case of not having tested it?
> 
> Because, I was just unsure of your intention, and I'm not having
> tested it.

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 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 <dest_ip> <my_ip_on_that_if> -interface
-ifp <ifname> -llinfo -nostatic" in olsrd and this patch. If there
is an easier way, I would love to use it.

John
-- 
John Hay -- John.Hay@meraka.csir.co.za / jhay@FreeBSD.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060930172824.GA61082>