All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vlad Yasevich <vyasevich@gmail.com>
To: Dan Williams <dcbw@redhat.com>,
	Hannes Frederic Sowa <hannes@stressinduktion.org>
Cc: David Miller <davem@davemloft.net>,
	jiri@resnulli.us, netdev@vger.kernel.org, kuznet@ms2.inr.ac.ru,
	jmorris@namei.org, yoshfuji@linux-ipv6.org, kaber@trash.net,
	thaller@redhat.com, stephen@networkplumber.org
Subject: Re: [patch net-next] ipv6: allow userspace to create address with IFLA_F_TEMPORARY flag
Date: Tue, 29 Oct 2013 12:58:38 -0400	[thread overview]
Message-ID: <526FE93E.3040300@gmail.com> (raw)
In-Reply-To: <1383057078.2236.12.camel@dcbw.foobar.com>

On 10/29/2013 10:31 AM, Dan Williams wrote:
> On Tue, 2013-10-29 at 00:48 +0100, Hannes Frederic Sowa wrote:
>> On Mon, Oct 28, 2013 at 06:16:19PM -0500, Dan Williams wrote:
>>> On Mon, 2013-10-28 at 17:17 -0400, David Miller wrote:
>>>> From: Hannes Frederic Sowa <hannes@stressinduktion.org>
>>>> Date: Sun, 27 Oct 2013 17:48:35 +0100
>>>>
>>>>> A temporary address is also bound to a non-privacy public address so
>>>>> it's lifetime is determined by its lifetime (e.g. if you switch the
>>>>> network and don't receive on-link information for that prefix any
>>>>> more). NetworkManager would have to take care about that, too. It is
>>>>> just a question of what NetworkManager wants to handle itself or lets
>>>>> the kernel handle for it.
>>>>
>>>> How much really needs to be in userspace to implement RFC4941?
>>>>
>>>> I don't like the idea that even for a fully up and properly
>>>> functioning link, if NetworkManager wedges then critical things like
>>>> temporary address (re-)generation, will cease.
>>>
>>> Honestly, I'd be completely happy to leave temporary address handling up
>>> to the kernel and *not* do it in userspace; the kernel already has all
>>> the code.  There are two problems with that though, (a) it's tied to
>>> in-kernel RA handling, and (b) it's controlled by a CONFIG option.  Both
>>> these are solvable.
>>
>> Ah, (a) does complicate things, I agree. But the tieing is essential
>> currently. So it seems a netlink interface would be needed to tie a new
>> address to an already installed one, if the kernel should still deal
>> with the regeneration?
>
> I think it's simpler than that.  New flag set when adding the
> non-private address that says "create and manage privacy addresses for
> this non-private address".  The kernel then adds the privacy addresses
> generated off the non-private address/prefixlen, and ties their lifetime
> to the non-private address.  If the non-private address is removed, the
> privacy addresses could get removed too.
>
> I don't think we need API to tie addresses to already installed ones,
> because the kernel already has the privacy address generation code, so
> why should userspace generate the privacy address at all?  Just leave
> that to the kernel.
>
>>> First off, what's the reasoning behind having IPv6 privacy as a config
>>> option?  It's off-by-default and must be explicitly turned on, so is
>>> there any harm in removing the config?  Or is it just for
>>> smallest-kernel-ever folks?
>>
>> I don't know about the policy. Does it really matter as distributions
>> normally switch it on? But I would not like to see the option removed
>> entirly, maybe the default could be changed.
>>
>>> Would a new IFA_F_MANAGE_TEMP (or better name) work here, indicating
>>> that for some new static address, that the kernel should create and
>>> manage the temporary privacy addresses associated with its prefix?
>>
>> But this would only be needed if they were managed in user-space, no?
>
> "if they" == what?  privacy address or static address?  What
> NetworkManager is trying to do is handle RAs in userspace with libndp
> for various flexibility and behavioral reasons, but we'd really like to
> leave all the temporary address stuff up to the kernel.
>
> So NM would handle RA/RS and when it gets a prefix, it would create the
> IPv6 non-private address and add it to the interface.  When adding, it
> would also set the "IFA_F_MANAGE_TEMP" flag (or whatever) and the kernel
> would then handle all the privacy address generation, lifetimes, and
> timers.  Basically, break some of the privacy code away from the
> in-kernel RA handling so that privacy addresses could be triggered from
> userland too.
>
> Would that be workable?

You are still dependent on the NM/user app to do this and what happens
if that apps wedges?

I think we should just do privacy addresses automatically, or based on
some sysconfig setting per interface to give users ability to turn it
off.  But I agree with David, and I speak from experience.
You don't whant address configuration to be done by userspace daemon.
There are too many things that can go wrong.

-vlad

>
> Dan
>

  parent reply	other threads:[~2013-10-29 16:58 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-24 13:45 [patch net-next] ipv6: allow userspace to create address with IFLA_F_TEMPORARY flag Jiri Pirko
2013-10-24 13:48 ` [patch iproute2] allow to create temporary addresses Jiri Pirko
2013-10-24 14:02 ` [patch net-next] ipv6: allow userspace to create address with IFLA_F_TEMPORARY flag Hannes Frederic Sowa
2013-10-24 16:59   ` Jiri Pirko
2013-10-25 10:05     ` Vladislav Yasevich
2013-10-25 20:12       ` Hannes Frederic Sowa
2013-10-25 23:05 ` Vladislav Yasevich
2013-10-27 13:29   ` Jiri Pirko
2013-10-27 16:48     ` Hannes Frederic Sowa
2013-10-28 13:56       ` Vladislav Yasevich
2013-10-28 21:17       ` David Miller
2013-10-28 23:16         ` Dan Williams
2013-10-28 23:23           ` Dan Williams
2013-10-29  0:12             ` David Miller
2013-10-28 23:48           ` Hannes Frederic Sowa
2013-10-29 14:31             ` Dan Williams
2013-10-29 14:38               ` Hannes Frederic Sowa
2013-10-29 17:21                 ` Dan Williams
2013-10-29 16:58               ` Vlad Yasevich [this message]
2013-10-29 17:15                 ` Dan Williams
2013-10-29  0:08           ` David Miller
2013-10-29  0:13             ` Hannes Frederic Sowa
2013-10-29  0:46               ` David Miller
2013-10-28 23:31         ` Hannes Frederic Sowa
2013-10-29  0:43           ` David Miller
2013-10-29  9:37             ` David Laight
2013-10-29 12:40               ` Hannes Frederic Sowa
2013-10-29 13:09                 ` Eric Dumazet
2013-10-29 13:11                   ` Hannes Frederic Sowa
2013-10-29 19:58                 ` David Miller
2013-11-01 21:28                   ` Hannes Frederic Sowa
2013-11-05 17:02                 ` Nicolas Dichtel
2013-11-05 17:12                   ` David Laight
2013-11-05 21:11                     ` Hannes Frederic Sowa
2013-11-06  9:23                       ` David Laight
2013-11-06 12:03                         ` Hannes Frederic Sowa
2013-11-05 20:57                   ` Hannes Frederic Sowa
2013-11-06  8:11                     ` Nicolas Dichtel
2013-11-09  0:54                     ` [RFC PATCH net-next 1/2] ipv4: fix wildcard search with inet_confirm_addr() Nicolas Dichtel
2013-11-09  0:54                       ` [RFC PATCH net-next 2/2] udp: add sk opt to allow sending pkt with src 0.0.0.0 Nicolas Dichtel
2013-11-09 14:46                         ` Julian Anastasov
2013-11-12  8:59                           ` Nicolas Dichtel
2013-11-11  5:18                         ` David Miller
2013-11-14 13:05                           ` Nicolas Dichtel
2013-11-14 19:57                             ` David Miller
2013-11-18  9:15                               ` Nicolas Dichtel
2013-11-14 14:31                           ` Hannes Frederic Sowa
2013-11-14 20:00                             ` David Miller
2013-10-29 19:44               ` [patch net-next] ipv6: allow userspace to create address with IFLA_F_TEMPORARY flag David Miller

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=526FE93E.3040300@gmail.com \
    --to=vyasevich@gmail.com \
    --cc=davem@davemloft.net \
    --cc=dcbw@redhat.com \
    --cc=hannes@stressinduktion.org \
    --cc=jiri@resnulli.us \
    --cc=jmorris@namei.org \
    --cc=kaber@trash.net \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    --cc=thaller@redhat.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.