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

Re: [libvirt] [PATCH] (updated) additional parameters needed for dnsmasq



On 08/22/2012 10:59 AM, Gene Czarcinski wrote:
> As I said in a previous message, dnsmasq is forwarding a number of
> queries upstream that should not be done.  There still remains an MX
> query for a plain name with no domain specified that will be forwarded
> is dnsmasq has --domain=xxx  --local=/xxx/ specified. This does not
> happen with no domain name and --local=// ... not a libvirt problem.
> 

This message needs adjustment before it is appropriate for libvirt.git
(a year from now, someone reading 'git log' will have no idea what it
was '(updated)' from, nor know the URL to the 'previous message').

> -    if (network->def->domain)
> +    if (network->def->domain) {
>          virCommandAddArgList(cmd, "--domain", network->def->domain, NULL);
> +        virCommandAddArgFormat(cmd, "--local=/%s/", network->def->domain);
> +        virCommandAddArgList(cmd, "--domain-needed", "--filterwin2k",
> NULL);
> +    }
> +    else { /* need to specify local even if no domain specified */
> +        virCommandAddArg(cmd, "--local=//");
> +        virCommandAddArgList(cmd, "--domain-needed", "--filterwin2k",
> NULL);
> +    }

Simpler as:

if (network->def->domain)
    virCommandArgPair(cmd, "--domain", network->def->domain);
virCommandAddArgFormat(cmd, "--local=/%s/",
    network->def->domain ? network->def->domain : "");
virCommandAddArgList(cmd, "--domain-needed", "--filterwin2k", NULL);

with a corresponding tweak in the testsuite to recognize
'--domain=example.com' as a result.

> 
> Just in case, I also attached the patch.

Thanks, that helped.  Your mail failed to make it through 'git am', but
your attachment made it through 'git apply' so I was still able to piece
the two together to form the commit message using the headers from your
email for correct attribution.  But using 'git send-email' in the future
would make it easier to apply your patches; we have some hints on that
in our HACKING file.

ACK and pushed with the above tweak, and with adding you to AUTHORS (let
us know if you prefer any other spelling or email address; the file is
in UTF-8).

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


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