]> git.ipfire.org Git - thirdparty/libvirt.git/commit
network: don't add "no-resolv" if we still need DNS servers from resolv.conf
authorLaine Stump <laine@laine.org>
Fri, 17 Mar 2017 16:25:43 +0000 (12:25 -0400)
committerLaine Stump <laine@laine.org>
Tue, 21 Mar 2017 15:25:59 +0000 (11:25 -0400)
commit15b5902db939f2fadd32c91bc2fd66774ff89662
tree39ad8e08b49be2db0a73ce7ddc68d2724572cb66
parentf9144125b83f1d4155a46d15da4d62ba37717c43
network: don't add "no-resolv" if we still need DNS servers from resolv.conf

It was pointed out here:

  https://bugzilla.redhat.com/show_bug.cgi?id=1331796#c4

that we shouldn't be adding a "no-resolv" to the dnsmasq.conf file for
a network if there isn't any <forwarder> element that specifies an IP
address but no qualifying domain. If there is such an element, it will
handle all DNS requests that weren't otherwise handled by one of the
forwarder entries with a matching domain attribute. If not, then DNS
requests that don't match the domain of any <forwarder> would not be
resolved if we added no-resolv.

So, only add "no-resolv" when there is at least one <forwarder>
element that specifies an IP address but no qualifying domain.
src/network/bridge_driver.c
tests/networkxml2confdata/nat-network-dns-forwarder-no-resolv.conf [new file with mode: 0644]
tests/networkxml2confdata/nat-network-dns-forwarder-no-resolv.xml [new file with mode: 0644]
tests/networkxml2confdata/nat-network-dns-forwarders.conf
tests/networkxml2conftest.c
tests/networkxml2xmlin/nat-network-dns-forwarder-no-resolv.xml [new file with mode: 0644]
tests/networkxml2xmlout/nat-network-dns-forwarder-no-resolv.xml [new file with mode: 0644]
tests/networkxml2xmltest.c