All of lore.kernel.org
 help / color / mirror / Atom feed
* IPv4/IPv6 sysctl defaults in new namespace
@ 2016-02-15 10:49 Konstantin Khlebnikov
       [not found] ` <CALYGNiNJ=LCyo4v7B1BUZH-27bc22ap-RQKpPQN7m0V3kBjkPw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Konstantin Khlebnikov @ 2016-02-15 10:49 UTC (permalink / raw)
  To: Linux Kernel Network Developers, Linux Containers
  Cc: Vasily Averin, David Miller, Eric W. Biederman, Pavel Emelyanov

IPv6 initialized with default. That's ok.
IPv4 makes a copy from init_net. Looks like a bug, here
v2.6.24-2577-g752d14dc6aa9

root@zurg:~# sysctl net.ipv4.conf.all.forwarding=0
net.ipv6.conf.all.forwarding=0
net.ipv4.conf.all.forwarding = 0
net.ipv6.conf.all.forwarding = 0
root@zurg:~# unshare -n sysctl net.ipv4.conf.all.forwarding
net.ipv6.conf.all.forwarding
net.ipv4.conf.all.forwarding = 0
net.ipv6.conf.all.forwarding = 0
root@zurg:~# sysctl net.ipv4.conf.all.forwarding=1
net.ipv6.conf.all.forwarding=1
net.ipv4.conf.all.forwarding = 1
net.ipv6.conf.all.forwarding = 1
root@zurg:~# unshare -n sysctl net.ipv4.conf.all.forwarding
net.ipv6.conf.all.forwarding
net.ipv4.conf.all.forwarding = 1
net.ipv6.conf.all.forwarding = 0

This is nasty. Could we fix this or this bug set in stone?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: IPv4/IPv6 sysctl defaults in new namespace
       [not found] ` <CALYGNiNJ=LCyo4v7B1BUZH-27bc22ap-RQKpPQN7m0V3kBjkPw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2016-02-15 21:26   ` Eric W. Biederman
  0 siblings, 0 replies; 3+ messages in thread
From: Eric W. Biederman @ 2016-02-15 21:26 UTC (permalink / raw)
  To: Konstantin Khlebnikov
  Cc: Linux Kernel Network Developers, Linux Containers, Vasily Averin,
	David Miller, Pavel Emelyanov

Konstantin Khlebnikov <koct9i-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> IPv6 initialized with default. That's ok.
> IPv4 makes a copy from init_net. Looks like a bug, here
> v2.6.24-2577-g752d14dc6aa9
>
> root@zurg:~# sysctl net.ipv4.conf.all.forwarding=0
> net.ipv6.conf.all.forwarding=0
> net.ipv4.conf.all.forwarding = 0
> net.ipv6.conf.all.forwarding = 0
> root@zurg:~# unshare -n sysctl net.ipv4.conf.all.forwarding
> net.ipv6.conf.all.forwarding
> net.ipv4.conf.all.forwarding = 0
> net.ipv6.conf.all.forwarding = 0
> root@zurg:~# sysctl net.ipv4.conf.all.forwarding=1
> net.ipv6.conf.all.forwarding=1
> net.ipv4.conf.all.forwarding = 1
> net.ipv6.conf.all.forwarding = 1
> root@zurg:~# unshare -n sysctl net.ipv4.conf.all.forwarding
> net.ipv6.conf.all.forwarding
> net.ipv4.conf.all.forwarding = 1
> net.ipv6.conf.all.forwarding = 0
>
> This is nasty. Could we fix this or this bug set in stone?

The test is do we break anyone, and the initial network namespace
is arbitrary enough I don't think anyone can depend upon a specific
value when creating a new network namespace.  So if someone is willing
to do the work we can fix this.

Of course the fixes would have to made against a recent kernel not
something as ancient as 2.6.24.

Eric

^ permalink raw reply	[flat|nested] 3+ messages in thread

* IPv4/IPv6 sysctl defaults in new namespace
@ 2016-02-15 10:49 Konstantin Khlebnikov
  0 siblings, 0 replies; 3+ messages in thread
From: Konstantin Khlebnikov @ 2016-02-15 10:49 UTC (permalink / raw)
  To: Linux Kernel Network Developers, Linux Containers
  Cc: Vasily Averin, Pavel Emelyanov, David Miller, Eric W. Biederman

IPv6 initialized with default. That's ok.
IPv4 makes a copy from init_net. Looks like a bug, here
v2.6.24-2577-g752d14dc6aa9

root@zurg:~# sysctl net.ipv4.conf.all.forwarding=0
net.ipv6.conf.all.forwarding=0
net.ipv4.conf.all.forwarding = 0
net.ipv6.conf.all.forwarding = 0
root@zurg:~# unshare -n sysctl net.ipv4.conf.all.forwarding
net.ipv6.conf.all.forwarding
net.ipv4.conf.all.forwarding = 0
net.ipv6.conf.all.forwarding = 0
root@zurg:~# sysctl net.ipv4.conf.all.forwarding=1
net.ipv6.conf.all.forwarding=1
net.ipv4.conf.all.forwarding = 1
net.ipv6.conf.all.forwarding = 1
root@zurg:~# unshare -n sysctl net.ipv4.conf.all.forwarding
net.ipv6.conf.all.forwarding
net.ipv4.conf.all.forwarding = 1
net.ipv6.conf.all.forwarding = 0

This is nasty. Could we fix this or this bug set in stone?

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-02-15 21:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-15 10:49 IPv4/IPv6 sysctl defaults in new namespace Konstantin Khlebnikov
     [not found] ` <CALYGNiNJ=LCyo4v7B1BUZH-27bc22ap-RQKpPQN7m0V3kBjkPw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-02-15 21:26   ` Eric W. Biederman
  -- strict thread matches above, loose matches on Subject: below --
2016-02-15 10:49 Konstantin Khlebnikov

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.