[libvirt] [PATCH] network: Don't ignore errors in dnsmasq config file creation
Matthias Bolte
matthias.bolte at googlemail.com
Wed Jun 29 00:09:27 UTC 2011
2011/6/28 Eric Blake <eblake at redhat.com>:
> 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.
Thanks, pushed.
--
Matthias Bolte
http://photron.blogspot.com
More information about the libvir-list
mailing list