Subject: Re: [Patch net-next v3 3/4] vxlan: add ipv6 support

From: Cong Wang <[email-masked]>
Date: Wed, 17 Apr 2013 09:43:42 +0800

On Mon, 2013-04-15 at 09:27 -0400, David Stevens wrote:
> Cong Wang <[email-masked]> wrote on 04/09/2013 06:47:26 AM:
> 
> > From: Cong Wang <[email-masked]>
> > To: David Stevens/Beaverton/IBM@IBMUS
> > Cc: "David S. Miller" <[email-masked]>, [email-masked],
> > Stephen Hemminger <[email-masked]>
> > Date: 04/09/2013 06:47 AM
> > Subject: Re: [Patch net-next v3 3/4] vxlan: add ipv6 support
> > 
> > On Mon, 2013-04-08 at 08:53 -0400, David Stevens wrote:
> > >         With your current definitions, "sin6" is just an in6_addr, but
> > > you are not checking the sin6_scope_id, which is not correct for IPv6
> > > link-local addresses. You can rely on "ifindex" in vxlan_rdst for
> > > fdb entries, but you'd at least need to make sure it is not 0 for LL
> > > scope, and you still need sin6_scope_id to match for calls in 
> > > vxlan_snoop()
> > > and vxlan_group_used(). The same sin6_addr with different
> > > sin6_scope_id
> > > for link-local addrs is not the same address in v6. 
> > 
> > It seems this is not very easy to do, at least for me. So I will send
> > another patch after this patcheset is merged, now let's not make this to
> > be a blocker for this patchset.
> 
> Cong,
>         I'm not sure if you mean you're withdrawing the v6 support patch,
> or asking that we address link-local v6 addresses separately. I don't
> think we want to have code in a distro that doesn't handle LL properly
> without error when an LL address is added, and I also think a solution
> may influence the netlink API, so I'd like to see LL support go in at
> the same time as v6 support.

I am saying to fix this in another separated patch, not in this
patchset.

It will need more time and as you probably already noticed there are
many vxlan patches recently in netdev, the more time this blocks, the
more patches will come up, the more conflicts I will get...

>         I think we want essentially the same solution used in the socket
> API, so the layout should be a sockaddr with the sin6_scope_id field
> present and verified for the AF_INET6 family variant. It could be a
> matching type with a different name if there are user-level include
> issues as Dave referenced before.

>         Then, if it's an AF_INET6 and a link-local sin6_addr, the
> sin6_scope_id must be non-zero and a valid interface index, or return
> error. Deleted interfaces could still result in stale fdb entries, but
> those could be removed (or at least matching packets dropped) based on
> the route failures they would cause during packet forwarding.
> 

Which interface index will be used?