mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-12-25 06:10:20 +00:00
Make IPv6 features of Pi-hole DHCP server switchable
This commit is contained in:
parent
3a90c1c192
commit
200995bf29
1 changed files with 7 additions and 2 deletions
|
@ -215,12 +215,16 @@ dhcp-option=option:router,${DHCP_ROUTER}
|
||||||
dhcp-leasefile=/etc/pihole/dhcp.leases
|
dhcp-leasefile=/etc/pihole/dhcp.leases
|
||||||
domain=${PIHOLE_DOMAIN}
|
domain=${PIHOLE_DOMAIN}
|
||||||
#quiet-dhcp
|
#quiet-dhcp
|
||||||
#quiet-dhcp6
|
" > "${dhcpconfig}"
|
||||||
|
|
||||||
|
if [[ "${DHCP_IPv6}" == "true" ]]; then
|
||||||
|
echo "#quiet-dhcp6
|
||||||
#enable-ra
|
#enable-ra
|
||||||
dhcp-option=option6:dns-server,[::]
|
dhcp-option=option6:dns-server,[::]
|
||||||
dhcp-range=::100,::1ff,constructor:${interface},ra-names,slaac,${leasetime}
|
dhcp-range=::100,::1ff,constructor:${interface},ra-names,slaac,${leasetime}
|
||||||
ra-param=*,0,0
|
ra-param=*,0,0
|
||||||
" > "${dhcpconfig}"
|
" >> "${dhcpconfig}"
|
||||||
|
fi
|
||||||
|
|
||||||
else
|
else
|
||||||
rm "${dhcpconfig}"
|
rm "${dhcpconfig}"
|
||||||
|
@ -235,6 +239,7 @@ EnableDHCP(){
|
||||||
change_setting "DHCP_ROUTER" "${args[4]}"
|
change_setting "DHCP_ROUTER" "${args[4]}"
|
||||||
change_setting "DHCP_LEASETIME" "${args[5]}"
|
change_setting "DHCP_LEASETIME" "${args[5]}"
|
||||||
change_setting "PIHOLE_DOMAIN" "${args[6]}"
|
change_setting "PIHOLE_DOMAIN" "${args[6]}"
|
||||||
|
change_setting "DHCP_IPv6" "${args[7]}"
|
||||||
|
|
||||||
# Remove possible old setting from file
|
# Remove possible old setting from file
|
||||||
delete_dnsmasq_setting "dhcp-"
|
delete_dnsmasq_setting "dhcp-"
|
||||||
|
|
Loading…
Reference in a new issue