netdev
[Top] [All Lists]

Re: [PATCH] IPv6: (5/5+1) Autoconfig link-local addr to IPv6 tunnels

To: YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@xxxxxxxxxxxxxx>
Subject: Re: [PATCH] IPv6: (5/5+1) Autoconfig link-local addr to IPv6 tunnels
From: Ville Nuorvala <vnuorval@xxxxxxxxxx>
Date: Wed, 3 Sep 2003 13:17:56 +0300 (EEST)
Cc: davem@xxxxxxxxxx, <pekkas@xxxxxxxxxx>, <usagi-core@xxxxxxxxxxxxxx>, <netdev@xxxxxxxxxxx>
In-reply-to: <20030903.063705.89449634.yoshfuji@xxxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
On Wed, 3 Sep 2003, YOSHIFUJI Hideaki / [iso-2022-jp] 吉藤英明 wrote:

> In article <20030902043534.05fc6586.davem@xxxxxxxxxx> (at Tue, 2 Sep 2003 
> 04:35:34 -0700), "David S. Miller" <davem@xxxxxxxxxx> says:
>
> > On Mon, 1 Sep 2003 17:24:42 +0300 (EEST)
> > Ville Nuorvala <vnuorval@xxxxxxxxxx> wrote:
> >
> > > Ok, this incremental patch to my previous addrconf.c patch generates a
> > > link-local address to the IPv6 tunnel device. It first tries to inherit
> > > the EUI64 identifier of some other device and if this fails, uses a
> > > random interface id.
> >
> > Yoshfuji, do you mind if I apply his patch 5 and "5/5+1"?
>
> Well, I have a question and a comment.
>
>         if (ifp->idev->cnf.forwarding == 0 &&
>             (dev->flags&IFF_LOOPBACK) == 0 &&
> +           dev->type != ARPHRD_TUNNEL6 &&
>             (ipv6_addr_type(&ifp->addr) & IPV6_ADDR_LINKLOCAL)) {
>                 struct in6_addr all_routers;
>
> Why?

The other end of the tunnel might not yet be set up to receive the packet,
which causes an ICMP error message to be sent back to the sender.

Besides, RS and RA over a ipv6-in-ipv6 tunnel is a _bad_ idea. A default
route through a tunnel without more advanced (policy/flow/srcaddr/? based)
routing schemes can lead to local routing loops.

Come to think of it a more elegant solution might be:

        if (ifp->idev->cnf.forwarding == 0 &&
            (dev->flags&IFF_LOOPBACK) == 0 &&
+           ifp->idev->cnf.rtr_solicits > 0 &&
            (ipv6_addr_type(&ifp->addr) & IPV6_ADDR_LINKLOCAL)) {
                struct in6_addr all_routers;

and set both idev->cnf.rtr_solicits = 0 and idev->cnf.accept_ra = 0 for
ARPHRD_TUNNEL6 devices

> Comment: this strategy is the "default."
> We can (or even should) do this stretegy whenever we failed to
> ipv6_generate_eui64() in addrconf_dev_config().

Should I send a separate patch to enable the random interface ids in
addrconf_dev_config()?

Regards,
Ville
--
Ville Nuorvala
Research Assistant, Institute of Digital Communications,
Helsinki University of Technology
email: vnuorval@xxxxxxxxxx, phone: +358 (0)9 451 5257


<Prev in Thread] Current Thread [Next in Thread>