]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
set veth host's side always up
authorDaniel Lezcano <daniel.lezcano@free.fr>
Mon, 17 Jan 2011 09:18:50 +0000 (10:18 +0100)
committerDaniel Lezcano <dlezcano@fr.ibm.com>
Mon, 17 Jan 2011 09:18:50 +0000 (10:18 +0100)
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>
src/lxc/conf.c

index 2f66e769f5f5c958f2be829e8dee41e2b0245575..a1bce19ecdff7d41ea937b0de34aedfaadcfbd74 100644 (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) {