Re: [PATCH] wrong if-condition in bridge_driver.c, networkBuildDnsmasqArgv, dhcp host definition

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
> index 7d43ef5..4c64a74 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);
>          }

Ouch. That was introduced by an oversight in
6e3e6db14fe80830cea3f427d8ff3fda7cc3f853 which changed return values of
networkSaveDnsmasqHostsfile from 1 to 0 on success and from 0 to -1 on error.

Thanks for the patch.

ACK and pushed.

Jirka

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]