diff options
author | Daniel Lezcano <daniel.lezcano@free.fr> | 2011-01-17 10:18:50 +0100 |
---|---|---|
committer | Daniel Lezcano <dlezcano@fr.ibm.com> | 2011-01-17 10:18:50 +0100 |
commit | 6e35af2e3911b5e8dc6e9091391beb8adfe449c6 (patch) | |
tree | fefd3ed15264dd0c4dec03a729758294da58c9c0 | |
parent | Fix mntflags initialization (diff) | |
download | lxc-6e35af2e3911b5e8dc6e9091391beb8adfe449c6.tar.gz lxc-6e35af2e3911b5e8dc6e9091391beb8adfe449c6.tar.bz2 lxc-6e35af2e3911b5e8dc6e9091391beb8adfe449c6.zip |
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>
-rw-r--r-- | src/lxc/conf.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/lxc/conf.c b/src/lxc/conf.c index 2f66e76..a1bce19 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -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) { |