diff options
author | David Ward <david.ward@ll.mit.edu> | 2011-01-17 10:18:50 +0100 |
---|---|---|
committer | Daniel Lezcano <dlezcano@fr.ibm.com> | 2011-01-17 10:18:50 +0100 |
commit | b0efbac48e8646ba62aca04b43acaa887ef4ec81 (patch) | |
tree | a49eecf2164629c6fe61c8aee44b3bf19eb5e2b4 | |
parent | set veth host's side always up (diff) | |
download | lxc-b0efbac48e8646ba62aca04b43acaa887ef4ec81.tar.gz lxc-b0efbac48e8646ba62aca04b43acaa887ef4ec81.tar.bz2 lxc-b0efbac48e8646ba62aca04b43acaa887ef4ec81.zip |
Only bring up network interface if IFF_UP is set
Each network interface was brought up regardless of the configuration,
as the wrong boolean operator was being used to test the IFF_UP flag.
Signed-off-by: David Ward <david.ward@ll.mit.edu>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
-rw-r--r-- | src/lxc/conf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lxc/conf.c b/src/lxc/conf.c index a1bce19..2201519 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -1217,7 +1217,7 @@ static int setup_netdev(struct lxc_netdev *netdev) /* empty network namespace */ if (!netdev->ifindex) { - if (netdev->flags | IFF_UP) { + if (netdev->flags & IFF_UP) { err = lxc_device_up("lo"); if (err) { ERROR("failed to set the loopback up : %s", @@ -1281,7 +1281,7 @@ static int setup_netdev(struct lxc_netdev *netdev) } /* set the network device up */ - if (netdev->flags | IFF_UP) { + if (netdev->flags & IFF_UP) { int err; err = lxc_device_up(current_ifname); |