1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-03-07 17:28:15 +00:00

Allow dnsmasq to provide DNS without DHCP

* src/network_driver.c: Always start dnsmasq to allow it to provide
  DNS, even if no DHCP ranges are enabled
This commit is contained in:
Daniel P. Berrange 2009-07-30 14:52:31 +01:00
parent 8db5f642e9
commit df3de82c06

View File

@ -136,8 +136,9 @@ networkFindActiveConfigs(struct network_driver *driver) {
brHasBridge(driver->brctl, obj->def->bridge) == 0) {
obj->active = 1;
/* Finally try and read dnsmasq pid if any DHCP ranges are set */
if (obj->def->nranges &&
/* Finally try and read dnsmasq pid if any */
if ((obj->def->ipAddress ||
obj->def->nranges) &&
virFileReadPid(NETWORK_PID_DIR, obj->def->name,
&obj->dnsmasqPid) == 0) {
@ -844,7 +845,8 @@ static int networkStartNetworkDaemon(virConnectPtr conn,
goto err_delbr2;
}
if (network->def->nranges &&
if ((network->def->ipAddress ||
network->def->nranges) &&
dhcpStartDhcpDaemon(conn, network) < 0)
goto err_delbr2;