+
+ if [ "$dynamicdhcp" = "0" ] ; then
+ END="static"
+ dhcp6range="::,static"
+ else
+ dhcp6range="::1000,::ffff"
+ fi
+
+
+ if [ "$dhcpv4" != "disabled" ] ; then
+ xappend "--dhcp-range=$nettag$START,$END,$NETMASK,$leasetime${options:+ $options}"
+ fi
+
+
+ if [ $DNSMASQ_DHCP_VER -eq 6 -a "$ra" = "server" ] ; then
+ # Note: dnsmasq cannot just be a DHCPv6 server (all-in-1)
+ # and let some other machine(s) send RA pointing to it.
+
+ case $ra_preference in
+ *high*)
+ xappend "--ra-param=$ifname,high,0,7200"
+ ;;
+ *low*)
+ xappend "--ra-param=$ifname,low,0,7200"
+ ;;
+ *)
+ # Send UNSOLICITED RA at default interval and live for 2 hours.
+ # TODO: convert flexible lease time into route life time (only seconds).
+ xappend "--ra-param=$ifname,0,7200"
+ ;;
+ esac
+
+ if [ "$dhcpv6" = "disabled" ] ; then
+ ra_management="3"
+ fi
+
+
+ case $ra_management in
+ 0)
+ # SLACC with DCHP for extended options
+ xappend "--dhcp-range=$nettag::,constructor:$ifname,ra-stateless,ra-names"
+ ;;
+ 2)
+ # DHCP address and RA only for management redirection
+ xappend "--dhcp-range=$nettag$dhcp6range,constructor:$ifname,$leasetime"
+ ;;
+ 3)
+ # SLAAC only but dnsmasq attempts to link HOSTNAME, DHCPv4 MAC, and SLAAC
+ xappend "--dhcp-range=$nettag::,constructor:$ifname,ra-only,ra-names"
+ ;;
+ *)
+ # SLAAC and full DHCP
+ xappend "--dhcp-range=$nettag$dhcp6range,constructor:$ifname,slaac,ra-names,$leasetime"
+ ;;
+ esac
+
+ if [ -n "$dns" ]; then
+ dnss=""
+ for d in $dns; do append dnss "[$d]" ","; done
+ else
+ dnss="[::]"
+ fi
+
+ dhcp_option_append "option6:dns-server,$dnss" "$networkid"
+ fi