netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Stewart <pstew@chromium.org>
To: "Bjørn Mork" <bjorn@mork.no>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCHv2] ipv6: Create module parameter for use_tempaddr
Date: Tue, 13 Sep 2011 12:56:28 -0700	[thread overview]
Message-ID: <CAMcMvshXgKCpwLFPzUWvmacTuqmSEjDfPgvZU2BHeC+WcXRH0A@mail.gmail.com> (raw)
In-Reply-To: <87r53ks2w3.fsf@nemi.mork.no>

On Tue, Sep 13, 2011 at 11:39 AM, Bjørn Mork <bjorn@mork.no> wrote:
> Paul Stewart <pstew@chromium.org> writes:
>
>> When ipv6 is used as a module, there is no good place to set
>> the default value for use_tempaddr.  Using sysctl.conf will
>> set this parameter too early -- before the module is loaded.
>> To solve this, create a module parameter that will set the
>> default value of use_tempaddr for all devices.
>
> How is use_tempaddr any different from the other /proc/sys/net/ipv6/*
> variables?  Do you want to add a module parameter for all of them?

With use_tempaddr and ipv6 loaded as a module, there is a gap of time
between addrconf starting up and whatever configuration one would use
to set use_tempaddr (you can't use sysctl.conf since module-load time
might be much later).  By the time boot scripts (or whatever you'd
use) are able to tweak use_tempaddr, it might be too late and the
global-trackable address (related to the MAC address) might end up in
use.  This negates the entire point of use_tempaddr.  If any of the
other flags suffer this badly at module-load time, I'd be happy to add
module parameters for them, but this is the only one that I've come to
be aware of.

> Why can't you run sysctl with an ipv6-specific sysctl.conf at a time
> fitting your boot sequence?  Or load the ipv6 module before sysctl is
> loads the default sysctl.conf if that is what you want?  Or just set the
> variables in your network configuration scripts, prior to bringing the
> interfaces up?
>
> Or do as most people do nowadays:  Forget that ipv6 can be built as a
> module, and just use it builtin.  It's not like it can be unloaded
> anyway, so building it as a module does not give you anything.

All helpful suggestions.  However, I'm not yet willing to accept the
claim that ipv6 cannot be used as a module unless the rest of the
system is painstakingly crafted to close any races between addrconf,
sysctl and other IPv6-using processes.  That strikes me as far too
brittle.

--
Paul

  reply	other threads:[~2011-09-13 19:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-01  6:03 [PATCH] ipv6: Create module parameter for use_tempaddr Paul Stewart
2011-09-06 23:56 ` Paul Stewart
2011-09-12 16:37   ` Paul Stewart
2011-09-12 19:51     ` Brian Haley
2011-09-01  6:03       ` [PATCHv2] " Paul Stewart
2011-09-13 18:39         ` Bjørn Mork
2011-09-13 19:56           ` Paul Stewart [this message]
2011-09-13 20:04             ` David Miller
2011-09-12 21:21       ` [PATCH] " Paul Stewart

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=CAMcMvshXgKCpwLFPzUWvmacTuqmSEjDfPgvZU2BHeC+WcXRH0A@mail.gmail.com \
    --to=pstew@chromium.org \
    --cc=bjorn@mork.no \
    --cc=netdev@vger.kernel.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).