From: Kay Schubert Date: Thu, 6 Jan 2011 08:14:58 +0000 (+0100) Subject: bridge: Fix generation of dnsmasq's --dhcp-hostsfile option X-Git-Tag: v0.8.8~252 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a43c7338d8772aa3a5bc0ec5914d3c28c20447c3;p=thirdparty%2Flibvirt.git bridge: Fix generation of dnsmasq's --dhcp-hostsfile option I added a host definition to a network definition: Lokal 2074f379-b82c-423f-9ada-305d8088daaa But due to the wrong if-statement the argument --dhcp-hostsfile doesn't get added to the dnsmasq command. The patch below fixes it for me. --- diff --git a/AUTHORS b/AUTHORS index b204bd6e09..721b8f827c 100644 --- a/AUTHORS +++ b/AUTHORS @@ -142,6 +142,7 @@ Patches have also been contributed by: Josh Durgin Roopa Prabhu Paweł Krześniak + Kay Schubert [....send patches to get your name here....] diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index 7d43ef59ce..4c64a74643 100644 --- a/src/network/bridge_driver.c +++ b/src/network/bridge_driver.c @@ -524,7 +524,7 @@ networkBuildDnsmasqArgv(virNetworkObjPtr network, goto cleanup; } - if (networkSaveDnsmasqHostsfile(ipdef, dctx, false) < 0) { + if (networkSaveDnsmasqHostsfile(ipdef, dctx, false) == 0) { virCommandAddArgPair(cmd, "--dhcp-hostsfile", dctx->hostsfile->path); }