linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ludwig Nussel <ludwig.nussel@suse.de>
To: linux-hotplug@vger.kernel.org
Subject: Re: future of sysctls?
Date: Tue, 17 May 2011 07:15:50 +0000	[thread overview]
Message-ID: <201105170915.50414.ludwig.nussel@suse.de> (raw)
In-Reply-To: <201105121741.27459.ludwig.nussel@suse.de>

Lennart Poettering wrote:
> On Thu, 12.05.11 17:41, Ludwig Nussel (ludwig.nussel@suse.de) wrote:
> > I'm currently struggling to find a sane way to set
> > net.ipv6.conf.default.use_tempaddr.
> > Traditionally at some point during boot "sysctl -e -q -p /etc/sysctl.conf" is
> > called. That doesn't really work out anymore. The aforementioned setting needs
> > to be applied after the ipv6 module is loaded (could be compiled into the
> > kernel too though) otherwise it wouldn't apply. It needs to be set before a
> > network driver is loaded though as the default value is copied to
> > interfaces specific settings at interface creation time. On top of
> > that there are also network interface specific sysctls that need to
> > be applied after an interface is created (e.g.
> > net.ipv6.conf.eth0.use_tempaddr).
> 
> Something like this is kinda broken anyway, since it is racy: you can
> apply the sysctl only after the interface is already available.

Exactly.

> Might be a good idea to just ignore these kinds of settings. Or if this
> is not possible, then set them from NM or whatever controls the network.

That's that hack that's currently in place. Network scripts grep
/etc/sysctl.conf for interface specific settings...

> > Are there any plans to better deal with that?
> > Like e.g. emitting events when some part of the kernel registers a sysctl so
> > userspace can override the compiled in default value?
> > Or just offer sysfs attributes instead of sysctls?
> 
> In a systemd world the ipv6 module is loaded very early and hence the
> sysctl should always be available, no special setup needed. If the same
> problem appears in real life with other modules too, then we could order
> sysctl setting after module loading and fix things by this.

Grepping for register_sysctl in the kernel sources shows quite a few modules
that use sysctls. A prominent one is nfs.
If you apply sysctl setttings after module loading, specifically network
drivers, the ipv6 setting won't have any effect anymore though.

cu
Ludwig

-- 
 (o_   Ludwig Nussel
 //\
 V_/_  http://www.suse.de/
SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) 

  parent reply	other threads:[~2011-05-17  7:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-12 15:41 future of sysctls? Ludwig Nussel
2011-05-15 15:47 ` Lennart Poettering
2011-05-17  7:15 ` Ludwig Nussel [this message]
2011-05-17 10:21 ` Lennart Poettering
2011-05-18  7:03 ` Ludwig Nussel
2011-05-18 17:32 ` Lennart Poettering
2011-05-23 21:49 ` Karel Zak

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=201105170915.50414.ludwig.nussel@suse.de \
    --to=ludwig.nussel@suse.de \
    --cc=linux-hotplug@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).