nspawn: wait for network namespace creation before interface setup (#8633)
authorPhilip Sequeira <phsequei@gmail.com>
Thu, 5 Apr 2018 14:04:27 +0000 (14:04 +0000)
committerFilipe Brandenburger <filbranden@google.com>
Thu, 5 Apr 2018 14:04:27 +0000 (07:04 -0700)
commit7511655807e90aa33ea7b71991401a79ec36bb41
tree813a7ba9b46eea7fdd8592eb7b4415e23a31d456
parent1b836bed2c21ff6d33c2d5464782f52315afe65a
nspawn: wait for network namespace creation before interface setup (#8633)

Otherwise, network interfaces can be "moved" into the container's
namespace while it's still the same as the host namespace, in which case
e.g. host0 for a veth ends up on the host side instead of inside the
container.

Regression introduced in 0441378080489e4ab6704cd0a2d78cb1ceaca899.

Fixes #8599.
src/nspawn/nspawn.c