[libvirt] [PATCH] network: Don't ignore errors in dnsmasq config file creation

Eric Blake eblake at redhat.com
Tue Jun 28 15:23:58 UTC 2011


On 06/28/2011 06:08 AM, Matthias Bolte wrote:
> ---
> 
> This patch depends on
> 
> https://www.redhat.com/archives/libvir-list/2011-June/msg01423.html

which is now ACK'd.

> 
>  src/network/bridge_driver.c |   23 +++++++++++++----------
>  src/util/dnsmasq.c          |   10 ++++------
>  src/util/dnsmasq.h          |    4 ++--
>  3 files changed, 19 insertions(+), 18 deletions(-)
> 
> diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
> index f48fdcb..f54a966 100644
> --- a/src/network/bridge_driver.c
> +++ b/src/network/bridge_driver.c
> @@ -446,7 +446,8 @@ networkBuildDnsmasqHostsfile(dnsmasqContext *dctx,
>      for (i = 0; i < ipdef->nhosts; i++) {
>          virNetworkDHCPHostDefPtr host = &(ipdef->hosts[i]);
>          if ((host->mac) && VIR_SOCKET_HAS_ADDR(&host->ip))
> -            dnsmasqAddDhcpHost(dctx, host->mac, &host->ip, host->name);
> +            if (dnsmasqAddDhcpHost(dctx, host->mac, &host->ip, host->name) < 0)
> +                return -1;
>      }

Good catch.  ACK.

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110628/8e225707/attachment-0001.sig>


More information about the libvir-list mailing list