Allow prefix :: in constructed dhcp-range.
diff --git a/man/dnsmasq.8 b/man/dnsmasq.8
index e843885..4357d99 100644
--- a/man/dnsmasq.8
+++ b/man/dnsmasq.8
@@ -663,6 +663,14 @@
to prevent prefixes becoming perpetual if the interface
gains a SLAAC address for the prefix when it is advertised by dnsmasq.
+If a dhcp-range is only being used for stateless DHCP and/or SLAAC,
+then the address can be simply ::
+
+.B --dhcp-range=::,constructor:eth0
+
+This removes the condition above, and will pick up the prefix from any address on eth0 which is NOT
+autoconfigured, slaac, temporary or deprecated.
+
There is a variant of the constructor: syntax using the keyword
.B constructor-noauth.
See
diff --git a/src/dhcp6.c b/src/dhcp6.c
index 89af7dd..3bb855f 100644
--- a/src/dhcp6.c
+++ b/src/dhcp6.c
@@ -539,7 +539,9 @@
}
else if ((addr6part(local) == addr6part(&template->start6) ||
- addr6part(local) == addr6part(&template->end6)) &&
+ addr6part(local) == addr6part(&template->end6) ||
+ (IN6_IS_ADDR_UNSPECIFIED(&template->start6) &&
+ IFACE_PERMANENT == (flags & (IFACE_PERMANENT | IFACE_DEPRECATED)))) &&
wildcard_match(template->template_interface, ifrn_name))
{
start6 = *local;