Re: [PATCH 07/10] network: Bridge - don't offer dnsmasq DHCP services when DHCP relay is enabled

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

 



On 02/27/2013 09:57 PM, TJ wrote:
> From: TJ <linux@xxxxxx>
>
> When dnsmasq's DNS services are required but the network is configured
> to use a DHCP relay agent (other than dnsmasq's proxy services) the
> configuration generated for dnsmasq should not enable DHCP services.
>
> Signed-off-by: TJ <linux@xxxxxx>
> ---
>  src/network/bridge_driver.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
> index c02d3de..a4cd727 100644
> --- a/src/network/bridge_driver.c
> +++ b/src/network/bridge_driver.c
> @@ -951,11 +951,12 @@ networkDnsmasqConfContents(virNetworkObjPtr network,
>  
>      ipv4def = ipv6def = NULL;
>      ipdef = network->def->ipv4_dhcp;
> -    if (ipdef && (ipdef->nranges || ipdef->nhosts))
> +    if (ipdef && ipdef->dhcp_enabled && !ipdef->dhcp_relay &&
> +        (ipdef->nranges || ipdef->nhosts))
>          ipv4def = ipdef;
>  
>      ipdef = network->def->ipv6_dhcp;
> -    if (ipdef) {
> +    if (ipdef && ipdef->dhcp_enabled && !ipdef->dhcp_relay) {
>          if (ipdef->nranges || ipdef->nhosts) {
>              ipv6def = ipdef;
>  
> @@ -1266,8 +1267,8 @@ static int
>  networkRefreshDhcpDaemon(struct network_driver *driver,
>                           virNetworkObjPtr network)
>  {
> -    int ret = -1, ii;

You apparently removed the usage of ii in an earlier patch, but are
removing the definition of ii here. That would have cause a build
failure after applying the earlier patch. AS Eric mentioned, you must be
able to successfully complete an autogen.sh && make check && make
syntax-check after applying each patch in the series in sequence.
Otherwise, git bisect becomes unusable. (This is another argument for
integrating more into each patch).


> -    virNetworkIpDefPtr ipdef, ipv4def, ipv6def;
> +    int ret = -1;
> +    virNetworkIpDefPtr ipv4def, ipv6def;
>      dnsmasqContext *dctx = NULL;
>  
>      /* if no IP addresses specified, nothing to do */

--
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]