set veth host's side always up

We should always have the veth host's side up, otherwise if we omit
the up flag in the configurationn, letting the container to configure
its interface, the network will be never enabled as the host's side
is not up.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
This commit is contained in:
Daniel Lezcano 2011-01-17 10:18:50 +01:00 committed by Daniel Lezcano
parent 91656ce587
commit 6e35af2e39

View File

@ -1406,13 +1406,10 @@ static int instanciate_veth(struct lxc_handler *handler, struct lxc_netdev *netd
goto out_delete;
}
if (netdev->flags & IFF_UP) {
err = lxc_device_up(veth1);
if (err) {
ERROR("failed to set %s up : %s", veth1,
strerror(-err));
goto out_delete;
}
err = lxc_device_up(veth1);
if (err) {
ERROR("failed to set %s up : %s", veth1, strerror(-err));
goto out_delete;
}
if (netdev->upscript) {