mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
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).
This commit is contained in:
@@ -117,6 +117,7 @@ mymain(void)
|
||||
DO_TEST("nat-network-dns-srv-record-minimal", restricted);
|
||||
DO_TEST("nat-network-name-with-quotes", restricted);
|
||||
DO_TEST("routed-network", full);
|
||||
DO_TEST("routed-network-no-dns", full);
|
||||
DO_TEST("open-network", full);
|
||||
DO_TEST("nat-network", dhcpv6);
|
||||
DO_TEST("nat-network-dns-txt-record", full);
|
||||
|
||||
Reference in New Issue
Block a user