mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 14:15:28 +00:00
82fe58ff26
dnsmasq documentation says that the *IPv4* prefix/network address/broadcast address sent to dhcp clients will be automatically determined by dnsmasq by looking at the interface it's listening on, so the original libvirt code did not add a netmask to the dnsmasq commandline (or later, the dnsmasq conf file). For *IPv6* however, dnsmasq apparently cannot automatically determine the prefix (functionally the same as a netmask), and it must be explicitly provided in the conf file (as a part of the dhcp-range option). So many years after IPv4 DHCP support had been added, when IPv6 dhcp support was added the prefix was included at the end of the dhcp-range setting, but only for IPv6. A user had reported a bug on a host where one of the interfaces was a superset of the libvirt network where dhcp is needed (e.g., the host's ethernet is 10.0.0.20/8, and the libvirt network is 10.10.0.1/24). For some reason dnsmasq was supplying the netmask for the /8 network to clients requesting an address on the /24 interface. This seems like a bug in dnsmasq, but even if/when it gets fixed there, it looks like there is no harm in just always adding the netmask to all IPv4 dhcp-range options similar to how prefix is added to all IPv6 dhcp-range options. Signed-off-by: Laine Stump <laine@laine.org> Reviewed-by: John Ferlan <jferlan@redhat.com> |
||
---|---|---|
.. | ||
dhcp6-nat-network.conf | ||
dhcp6-nat-network.xml | ||
dhcp6-network.conf | ||
dhcp6-network.xml | ||
dhcp6host-routed-network.conf | ||
dhcp6host-routed-network.xml | ||
isolated-network.conf | ||
isolated-network.xml | ||
nat-network-dns-forward-plain.conf | ||
nat-network-dns-forward-plain.xml | ||
nat-network-dns-forwarder-no-resolv.conf | ||
nat-network-dns-forwarder-no-resolv.xml | ||
nat-network-dns-forwarders.conf | ||
nat-network-dns-forwarders.xml | ||
nat-network-dns-hosts.conf | ||
nat-network-dns-hosts.xml | ||
nat-network-dns-local-domain.conf | ||
nat-network-dns-local-domain.xml | ||
nat-network-dns-srv-record-minimal.conf | ||
nat-network-dns-srv-record-minimal.xml | ||
nat-network-dns-srv-record.conf | ||
nat-network-dns-srv-record.xml | ||
nat-network-dns-txt-record.conf | ||
nat-network-dns-txt-record.xml | ||
nat-network-mtu.conf | ||
nat-network-mtu.xml | ||
nat-network-name-with-quotes.conf | ||
nat-network-name-with-quotes.xml | ||
nat-network.conf | ||
nat-network.xml | ||
netboot-network.conf | ||
netboot-network.xml | ||
netboot-proxy-network.conf | ||
netboot-proxy-network.xml | ||
open-network.conf | ||
open-network.xml | ||
ptr-domains-auto.conf | ||
ptr-domains-auto.xml | ||
routed-network-no-dns.conf | ||
routed-network-no-dns.xml | ||
routed-network.conf | ||
routed-network.xml |