|
|
810ca6 |
From 21ec87f4f1a538f929c48ecb2bdbf48701022779 Mon Sep 17 00:00:00 2001
|
|
|
810ca6 |
Message-Id: <21ec87f4f1a538f929c48ecb2bdbf48701022779.1397245564.git.crobinso@redhat.com>
|
|
|
810ca6 |
From: Richard Weinberger <richard@nod.at>
|
|
|
810ca6 |
Date: Tue, 8 Apr 2014 14:26:26 +0200
|
|
|
810ca6 |
Subject: [PATCH] LXC: Fix return code evaulation in lxcCheckNetNsSupport()
|
|
|
810ca6 |
|
|
|
810ca6 |
Commit b9dd878f (util: make it easier to grab only regular command exit)
|
|
|
810ca6 |
changed the call semantics of virCommandRun() and therefore of virRun()
|
|
|
810ca6 |
too. But lxcCheckNetNsSupport() was not updated.
|
|
|
810ca6 |
As consequence of this lxcCheckNetNsSupport always failed and broke LXC.
|
|
|
810ca6 |
|
|
|
810ca6 |
Signed-off-by: Richard Weinberger <richard@nod.at>
|
|
|
810ca6 |
---
|
|
|
810ca6 |
src/lxc/lxc_driver.c | 3 +--
|
|
|
810ca6 |
1 file changed, 1 insertion(+), 2 deletions(-)
|
|
|
810ca6 |
|
|
|
810ca6 |
diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
|
|
|
810ca6 |
index 33ff011..942e139 100644
|
|
|
810ca6 |
--- a/src/lxc/lxc_driver.c
|
|
|
810ca6 |
+++ b/src/lxc/lxc_driver.c
|
|
|
810ca6 |
@@ -1475,8 +1475,7 @@ static int lxcCheckNetNsSupport(void)
|
|
|
810ca6 |
const char *argv[] = {"ip", "link", "set", "lo", "netns", "-1", NULL};
|
|
|
810ca6 |
int ip_rc;
|
|
|
810ca6 |
|
|
|
810ca6 |
- if (virRun(argv, &ip_rc) < 0 ||
|
|
|
810ca6 |
- !(WIFEXITED(ip_rc) && (WEXITSTATUS(ip_rc) != 255)))
|
|
|
810ca6 |
+ if (virRun(argv, &ip_rc) < 0 || ip_rc == 255)
|
|
|
810ca6 |
return 0;
|
|
|
810ca6 |
|
|
|
810ca6 |
if (lxcContainerAvailable(LXC_CONTAINER_FEATURE_NET) < 0)
|
|
|
810ca6 |
--
|
|
|
810ca6 |
1.9.0
|
|
|
810ca6 |
|