Commit b0efbac4 by David Ward Committed by Daniel Lezcano

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: 's avatarDavid Ward <david.ward@ll.mit.edu> Signed-off-by: 's avatarDaniel Lezcano <dlezcano@fr.ibm.com>
parent 6e35af2e
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment