]> xenbits.xensource.com Git - libvirt.git/commit
network: allow disabling dnsmasq's DNS server
authorLaine Stump <laine@laine.org>
Thu, 11 Aug 2016 21:29:43 +0000 (17:29 -0400)
committerLaine Stump <laine@laine.org>
Sat, 20 Aug 2016 01:10:34 +0000 (21:10 -0400)
commit9065cfaa889b3512ad02560fbefb05c75349b10b
tree24f317e7ea5d11fe382c00687882c7ff3a65a755
parent25e8112d7c32ab271b9cae28f3ccbf5835206693
network: allow disabling dnsmasq's DNS server

If you define a libvirt virtual network with one or more IP addresses,
it starts up an instance of dnsmasq. It's always been possible to
avoid dnsmasq's dhcp server (simply don't include a <dhcp> element),
but until now it wasn't possible to avoid having the DNS server
listening; even if the network has no <dns> element, it is started
using default settings.

This patch adds a new attribute to <dns>: enable='yes|no'. For
backward compatibility, it defaults to 'yes', but if you don't want a
DNS server created for the network, you can simply add:

   <dns enable='no'/>

to the network configuration, and next time the network is started
there will be no dns server created (if there is dhcp configuration,
dnsmasq will be started with "port=0" which disables the DNS server;
if there is no dhcp configuration, dnsmasq won't be started at all).
12 files changed:
docs/formatnetwork.html.in
docs/schemas/network.rng
src/conf/network_conf.c
src/conf/network_conf.h
src/network/bridge_driver.c
tests/networkxml2confdata/routed-network-no-dns.conf [new file with mode: 0644]
tests/networkxml2confdata/routed-network-no-dns.xml [new file with mode: 0644]
tests/networkxml2conftest.c
tests/networkxml2xmlin/routed-network-no-dns-extra-elements.xml [new file with mode: 0644]
tests/networkxml2xmlin/routed-network-no-dns.xml [new file with mode: 0644]
tests/networkxml2xmlout/routed-network-no-dns.xml [new file with mode: 0644]
tests/networkxml2xmltest.c