IPv4/IPv6 sysctl defaults in new namespace

Konstantin Khlebnikov koct9i at gmail.com
Mon Feb 15 10:49:18 UTC 2016


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 at 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 at 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 at 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 at 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?


More information about the Containers mailing list