[PATCH] Catch dnsmasq start failures

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



While we checked the return value we didn't maks sure ret != 0 which
resulted in dnsmasq errors being ignored.
---
 src/network/bridge_driver.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
index 554a8ac..4882753 100644
--- a/src/network/bridge_driver.c
+++ b/src/network/bridge_driver.c
@@ -731,8 +731,10 @@ networkStartDhcpDaemon(virNetworkObjPtr network)
     if (ret < 0)
         goto cleanup;
 
-    if (virCommandRun(cmd, NULL) < 0)
+    ret = virCommandRun(cmd, NULL);
+    if (ret < 0) {
         goto cleanup;
+    }
 
     /*
      * There really is no race here - when dnsmasq daemonizes, its
-- 
1.7.5.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]