dnsmasq: avoid forwarding queries without a domain

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.

BTW, thanks again to Claudio Bley!
This commit is contained in:
Gene Czarcinski 2012-08-22 12:59:24 -04:00 committed by Eric Blake
parent 5b7f5a049c
commit f3868259ca
11 changed files with 24 additions and 12 deletions

View File

@ -260,6 +260,7 @@ Patches have also been contributed by:
Thomas Woerner <twoerner@redhat.com>
J.B. Joret <jb@linux.vnet.ibm.com>
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Gene Czarcinski <gene@czarc.net>
[....send patches to get your name here....]

View File

@ -539,7 +539,11 @@ networkBuildDnsmasqArgv(virNetworkObjPtr network,
virCommandAddArgList(cmd, "--strict-order", "--bind-interfaces", NULL);
if (network->def->domain)
virCommandAddArgList(cmd, "--domain", network->def->domain, NULL);
virCommandAddArgPair(cmd, "--domain", network->def->domain);
/* need to specify local even if no domain specified */
virCommandAddArgFormat(cmd, "--local=/%s/",
network->def->domain ? network->def->domain : "");
virCommandAddArgList(cmd, "--domain-needed", "--filterwin2k", NULL);
if (pidfile)
virCommandAddArgPair(cmd, "--pid-file", pidfile);

View File

@ -1,4 +1,5 @@
@DNSMASQ@ --strict-order --bind-interfaces --conf-file= \
@DNSMASQ@ --strict-order --bind-interfaces \
--local=// --domain-needed --filterwin2k --conf-file= \
--except-interface lo --dhcp-option=3 --no-resolv \
--listen-address 192.168.152.1 \
--dhcp-range 192.168.152.2,192.168.152.254 \

View File

@ -1,3 +1,4 @@
@DNSMASQ@ --strict-order --bind-interfaces --domain example.com \
@DNSMASQ@ --strict-order --bind-interfaces --domain=example.com \
--local=/example.com/ --domain-needed --filterwin2k \
--conf-file= --except-interface lo --listen-address 192.168.122.1 \
--expand-hosts --addn-hosts=/var/lib/libvirt/dnsmasq/default.addnhosts\

View File

@ -1,7 +1,7 @@
@DNSMASQ@ \
--strict-order \
--bind-interfaces \
--conf-file= \
--local=// --domain-needed --filterwin2k --conf-file= \
--except-interface lo \
--srv-host=name.tcp.,,,, \
--listen-address 192.168.122.1 \

View File

@ -1,7 +1,7 @@
@DNSMASQ@ \
--strict-order \
--bind-interfaces \
--conf-file= \
--local=// --domain-needed --filterwin2k --conf-file= \
--except-interface lo \
--srv-host=name.tcp.test-domain-name,.,1024,10,10 \
--listen-address 192.168.122.1 \

View File

@ -1,4 +1,5 @@
@DNSMASQ@ --strict-order --bind-interfaces --conf-file= \
@DNSMASQ@ --strict-order --bind-interfaces \
--local=// --domain-needed --filterwin2k --conf-file= \
--except-interface lo --txt-record=example,example value \
--listen-address 192.168.122.1 --listen-address 192.168.123.1 \
--listen-address 2001:db8:ac10:fe01::1 \

View File

@ -1,4 +1,5 @@
@DNSMASQ@ --strict-order --bind-interfaces --conf-file= \
@DNSMASQ@ --strict-order --bind-interfaces \
--local=// --domain-needed --filterwin2k --conf-file= \
--except-interface lo --listen-address 192.168.122.1 \
--listen-address 192.168.123.1 --listen-address 2001:db8:ac10:fe01::1 \
--listen-address 2001:db8:ac10:fd01::1 --listen-address 10.24.10.1 \

View File

@ -1,5 +1,6 @@
@DNSMASQ@ --strict-order --bind-interfaces --domain example.com \
--conf-file= --except-interface lo --listen-address 192.168.122.1 \
@DNSMASQ@ --strict-order --bind-interfaces --domain=example.com \
--local=/example.com/ --domain-needed --filterwin2k --conf-file= \
--except-interface lo --listen-address 192.168.122.1 \
--dhcp-range 192.168.122.2,192.168.122.254 \
--dhcp-leasefile=/var/lib/libvirt/dnsmasq/netboot.leases \
--dhcp-lease-max=253 --dhcp-no-override --expand-hosts --enable-tftp \

View File

@ -1,5 +1,6 @@
@DNSMASQ@ --strict-order --bind-interfaces --domain example.com \
--conf-file= --except-interface lo --listen-address 192.168.122.1 \
@DNSMASQ@ --strict-order --bind-interfaces --domain=example.com \
--local=/example.com/ --domain-needed --filterwin2k --conf-file= \
--except-interface lo --listen-address 192.168.122.1 \
--dhcp-range 192.168.122.2,192.168.122.254 \
--dhcp-leasefile=/var/lib/libvirt/dnsmasq/netboot.leases \
--dhcp-lease-max=253 --dhcp-no-override --expand-hosts \

View File

@ -1,2 +1,3 @@
@DNSMASQ@ --strict-order --bind-interfaces --conf-file= \
@DNSMASQ@ --strict-order --bind-interfaces \
--local=// --domain-needed --filterwin2k --conf-file= \
--except-interface lo --listen-address 192.168.122.1\