From 3a8cc9cf5004984eb2b8bcb37c65fe28ad14fe0e Mon Sep 17 00:00:00 2001 From: Hongwei Bi Date: Tue, 22 Oct 2013 21:38:01 +0800 Subject: [PATCH] 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 --- src/network/bridge_driver.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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);