提交 df3de82c 编写于 作者: D Daniel P. Berrange

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
上级 8db5f642
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册