]> xenbits.xensource.com Git - libvirt.git/commitdiff
networkStartDhcpDaemon: Check for dnsmasqCapsRefresh failure
authorHongwei Bi <hwbi2008@gmail.com>
Tue, 22 Oct 2013 13:38:01 +0000 (21:38 +0800)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 22 Oct 2013 16:14:13 +0000 (17:14 +0100)
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 <hwbi2008@gmail.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/network/bridge_driver.c

index 8787bdbcfb2ac15fdef6fc06968441264bf49465..3ce31302a26c8912c5712bfad0149170abf3120e 100644 (file)
@@ -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);