From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, yoshfuji@linux-ipv6.org
Subject: Re: [PATCH net-next] ip6_tunnel: ensure to always have a link local address
Date: Wed, 21 Aug 2013 09:40:25 +0200 [thread overview]
Message-ID: <52146EE9.1060101@6wind.com> (raw)
In-Reply-To: <20130820.234818.2230621827416764963.davem@davemloft.net>
Le 21/08/2013 08:48, David Miller a écrit :
> From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
> Date: Tue, 20 Aug 2013 12:16:06 +0200
>
>> When an Xin6 tunnel is set up, we check other netdevices to inherit the link-
>> local address. If none is available, the interface will not have any link-local
>> address. RFC4862 expects that each interface has a link local address.
>>
>> Now than this kind of tunnels supports x-netns, it's easy to fall in this case
>> (by creating the tunnel in a netns where ethernet interfaces stand and then
>> moving it to a other netns where no ethernet interface is available).
>>
>> RFC4291, Appendix A suggests two methods: the first is the one currently
>> implemented, the second is to generate a unique identifier, so that we can
>> always generate the link-local address. Let's use eth_random_addr() to generate
>> this interface indentifier.
>>
>> I remove completly the previous method, hence for the whole life of the
>> interface, the link-local address remains the same (previously, it depends on
>> which ethernet interfaces were up when the tunnel interface was set up).
>>
>> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
>
> Applied, but this brings up an issue I keep noticing.
>
> We talk about eth_random_addr() and "uniqueness" together all the
> time, but the former never implies the latter.
>
> And we're going to run into situations where any conflicts generated
> by this random address generater will cause reall failures.
>
> Therefore we'll have to create a system to prevent them. Probably
> using some simple table that keeps track of the addresses we've
> generated.
>
Ok, I will look at this.
next prev parent reply other threads:[~2013-08-21 7:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-20 10:16 [PATCH net-next] ip6_tunnel: ensure to always have a link local address Nicolas Dichtel
2013-08-21 6:48 ` David Miller
2013-08-21 7:40 ` Nicolas Dichtel [this message]
2013-08-21 9:02 ` Bjørn Mork
2013-08-21 10:25 ` Nicolas Dichtel
2013-08-21 11:37 ` Bjørn Mork
2013-08-21 12:11 ` Nicolas Dichtel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52146EE9.1060101@6wind.com \
--to=nicolas.dichtel@6wind.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=yoshfuji@linux-ipv6.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).