From 200995bf293adf65706ea6334cd1ec41f1e28efc Mon Sep 17 00:00:00 2001 From: DL6ER Date: Tue, 3 Jan 2017 14:24:33 +0100 Subject: [PATCH] Make IPv6 features of Pi-hole DHCP server switchable --- advanced/Scripts/webpage.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/advanced/Scripts/webpage.sh b/advanced/Scripts/webpage.sh index 09f0e7dd..18ed982f 100755 --- a/advanced/Scripts/webpage.sh +++ b/advanced/Scripts/webpage.sh @@ -215,12 +215,16 @@ dhcp-option=option:router,${DHCP_ROUTER} dhcp-leasefile=/etc/pihole/dhcp.leases domain=${PIHOLE_DOMAIN} #quiet-dhcp -#quiet-dhcp6 +" > "${dhcpconfig}" + + if [[ "${DHCP_IPv6}" == "true" ]]; then +echo "#quiet-dhcp6 #enable-ra dhcp-option=option6:dns-server,[::] dhcp-range=::100,::1ff,constructor:${interface},ra-names,slaac,${leasetime} ra-param=*,0,0 -" > "${dhcpconfig}" +" >> "${dhcpconfig}" + fi else rm "${dhcpconfig}" @@ -235,6 +239,7 @@ EnableDHCP(){ change_setting "DHCP_ROUTER" "${args[4]}" change_setting "DHCP_LEASETIME" "${args[5]}" change_setting "PIHOLE_DOMAIN" "${args[6]}" + change_setting "DHCP_IPv6" "${args[7]}" # Remove possible old setting from file delete_dnsmasq_setting "dhcp-"