[systemd-devel] nspawn and ipv6 issue

Aliaksei Sheshka sheshkaoss at gmail.com
Wed Mar 16 16:13:40 UTC 2016


Hi!

I faced rather interesting behavior.

On host system I have:

net.ipv6.conf.default.autoconf=0
net.ipv6.conf.all.autoconf=0
net.ipv6.conf.default.accept_ra=0
net.ipv6.conf.all.accept_ra=0

and `ip addr` confirms no 'dynamic' addresses on the interfaces,

Then I spawn a container
`/usr/bin/systemd-nspawn --quiet --keep-unit --boot
--link-journal=try-guest --network-macvlan=eth0 --settings=override
--machine=mytests1`

I see inside
# ip addr | grep -E 'mv-eth0|dynamic'
2: mv-eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue
state UNKNOWN group default
    inet 10.10.61.86/25 scope link mv-eth0
    inet6 2001:NNNN:NNNN:NNNN:e8d2:e4ff:fefc:aadb/64 scope global
mngtmpaddr dynamic

which is wrong, dynamic address shouldn't be there.

My first idea was to do
# sysctl net.ipv6.conf.default.autoconf=0
sysctl: setting key "net.ipv6.conf.default.autoconf": Read-only file system

But that didn't work.
I believe it's a bug, either container should honor host machine
setting or provide sysctl machnism to alter behavior inside the
container.
At that stage I'm not sure it's systemd-nspawn bug or kernel namespace
implementation bug.
systemd 229, Linux kernel 4.2


More information about the systemd-devel mailing list