From: Hongwei Bi Date: Tue, 22 Oct 2013 13:38:01 +0000 (+0800) Subject: networkStartDhcpDaemon: Check for dnsmasqCapsRefresh failure X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=3a8cc9cf5004984eb2b8bcb37c65fe28ad14fe0e;p=libvirt.git networkStartDhcpDaemon: Check for dnsmasqCapsRefresh failure Currently, we ignore whether dnsmasqCapsRefresh succeeds or fails. We shouldn't do that as we may generate wrong dnsmasq command line (what is done just a few lines below). Signed-off-by: Hongwei Bi Signed-off-by: Michal Privoznik --- diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index 8787bdbcfb..3ce31302a2 100644 --- a/src/network/bridge_driver.c +++ b/src/network/bridge_driver.c @@ -1107,7 +1107,8 @@ networkStartDhcpDaemon(virNetworkDriverStatePtr driver, if (dctx == NULL) goto cleanup; - dnsmasqCapsRefresh(&driver->dnsmasqCaps, false); + if (dnsmasqCapsRefresh(&driver->dnsmasqCaps, NULL) < 0) + goto cleanup; ret = networkBuildDhcpDaemonCommandLine(network, &cmd, pidfile, dctx, driver->dnsmasqCaps);