[PATCH] ipv6: make the net.ipv6.conf.all.use_tempaddr sysctl propagate to interface settings

Leann Ogasawara leann.ogasawara at canonical.com
Fri Dec 16 16:23:04 UTC 2011

On Wed, 2011-12-14 at 11:10 -0500, Mathieu Trudel-Lapierre wrote:
> Hi,
> We're trying to enable IPv6 privacy extensions by default in Ubuntu, and
> I've noticed issues applying the sysctl settings: applying
> net.ipv6.conf.all.use_tempaddr which I'd expect, readying docs, to be
> propagated to the underlying interface-specific settings (e.g.
> net.ipv6.conf.eth0.use_tempaddr) for already-available interfaces; which
> does not work.
> Ideally at boot-time, one would only need to set the following settings:
> net.ipv6.conf.all.use_tempaddr   (to modify already-up/added interfaces)
> net.ipv6.conf.default.use_tempaddr (for future new interfaces)
> I wrote the attached patch which appears to correctly set the value of
> net.ipv6.conf.all.use_tempaddr on the interfaces when changed. I would
> be very grateful if I could get some review on that patch before
> submitting it upstream.
> It seems as though the issue is generally reproduced for most of the
> other ipv6 settings, and my reading of
> Documentation/networking/ip-sysctls.txt and net/ipv6/Kconfig (the help
> entry for IPV6_PRIVACY), but I'm concentrating on just use_tempaddr
> which is something we'd really need to make work.
> For more information about these issues, I found
> https://otrs.menandmice.com/otrs/public.pl?Action=PublicFAQ&ItemID=91
> which also links two bugzilla.kernel.org bugs (which I unfortunately
> can't reach).

Hi Mathieu,

So I did some investigation and was able to uncover the following
information from one of the bugzilla.kernel.org bugs (11655) you were
unable to reach:


Highlights include:


>From Dave Miller:
"Not a bug.

These "global" setting have to be set to the desired value before the
device is created.  And it is at creation time that these global
values are "inherited" by the device.

Afterwards changes to the global value will not propagate to those
devices again, because that might override a changed setting made
by the user.

It is only newly created devices which get these values."


>From bug reporter:
"I understand you are talking about /proc/sys/net/ipv6/conf/default/*
controls. If so, it's ok, but I talked
about /proc/sys/net/ipv6/conf/all/*
controls. Documentation/networking/ip-sysctl.txt says:

	    Change the interface-specific default settings.

	    Change all the interface-specific settings.

so what is the difference between default and all in the context of your
statement? In my opinion, it could be understood that default settings
are inherited and those from "all" directory change values for all
current devices.


>From Dave Miller:
"Unfortunately not all "all" knobs are treated universally, only some
of them all.

If you grep for "devconf_all" under net/ipv6 you'll see which ones
get used and in what manner.

Of course, we'll need to tweak either the docs or the implementation
to match :-)"


Reading the above thread I would assume this is intended behavior and
that the documentation needs updating.  However, it can't hurt sending
your patch upstream.  The worst that can happen is it gets Nack'd.  I
would like to see this clarified with upstream before we consider
carrying this in our tree.


>  It's also been discussed in the past on netdev
> (http://markmail.org/thread/pxw4o7p2k3xn5vh3#query:+page:1
> +mid:pxw4o7p2k3xn5vh3+state:results ) and on debian-kernel (can't find
> the thread again).
> Please keep me in CC; I'm not subscribed to this list.
> Regards,
> --
> Mathieu Trudel-Lapierre <mathieu.trudel-lapierre at canonical.com>
> Freenode: cyphermox, Jabber: mathieu.tl at gmail.com
> 4096R/EE018C93 1967 8F7D 03A1 8F38 732E  FF82 C126 33E1 EE01 8C93

More information about the kernel-team mailing list