[libvirt] [PATCH 1/3] network driver: Start dnsmasq even if no dhcp ranges/hosts are specified.
Eric Blake
eblake at redhat.com
Fri Mar 11 21:51:20 UTC 2011
On 03/11/2011 12:04 PM, Laine Stump wrote:
>
> 1) networkBuildDnsmasqArgv() = all uses of ipdef are protected from
> NULL dereference. (this patch doesn't change indentation, to make
> review easier. The next patch will change just the
> indentation). ipdef is intended to point to the first IPv4 address
> with DHCP info (or the first IPv4 address if none of them have any
> dhcp info).
>
> 2) networkStartDhcpDaemon() = if the loop looking for an ipdef with
> DHCP info comes up empty, we then grab the first IPv4 def from the
> list. Also, instead of returning if there are no IPv4 defs, we just
> return if there are no IP defs at all (either v4 or v6). This way a
> network that is IPv6-only will still get dnsmasq listening for DNS
> queries.
>
> 3) in networkStartNetworkDaemon() - we will startup dhcp not just if there
> are any IPv4 addresses, but also if there are any IPv6 addresses.
> @@ -1678,7 +1689,7 @@ networkStartNetworkDaemon(struct network_driver *driver,
>
>
> /* start dnsmasq if there are any IPv4 addresses */
> - if (v4present && networkStartDhcpDaemon(network) < 0)
> + if ((v4present || v6present) && networkStartDhcpDaemon(network) < 0)
The comment is now out-of-date.
ACK with that nit fixed.
--
Eric Blake eblake at redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110311/c6dfb5f4/attachment-0001.sig>
More information about the libvir-list
mailing list