From: Michael Tremer Date: Sat, 31 Jan 2015 13:19:03 +0000 (+0000) Subject: pppoe: Enable PD by default X-Git-Url: http://git.ipfire.org/?p=people%2Fstevee%2Fnetwork.git;a=commitdiff_plain;h=4cee7a5dc9097171f650c78f3f7b0c0176a22c0e pppoe: Enable PD by default DHCPv6 prefix deleagtion is enabled by default and will be executed when ever there is IPv6 connectivity on the PPP link. --- diff --git a/src/hooks/zones/pppoe b/src/hooks/zones/pppoe index 100c8a76..fa3f4ed6 100644 --- a/src/hooks/zones/pppoe +++ b/src/hooks/zones/pppoe @@ -49,7 +49,7 @@ PPPOE_PLUGIN="rp-pppoe.so" IPV6="true" # Use IPv6 prefix delegation. -PREFIX_DELEGATION="false" +PREFIX_DELEGATION="true" function hook_check_settings() { assert isset USERNAME @@ -356,3 +356,33 @@ function hook_port_detach() { exit ${EXIT_OK} } + +function hook_ppp_ipv6_up() { + local zone="${1}" + + ppp_common_ipv6_up "${zone}" + + # Read configuration + zone_settings_read "${zone}" + + if enabled PREFIX_DELEGATION; then + dhclient_start "${zone}" ipv6 + fi + + exit ${EXIT_OK} +} + +function hook_ppp_ipv6_down() { + local zone="${1}" + + ppp_common_ipv6_down "${zone}" + + # Read configuration + zone_settings_read "${zone}" + + if enabled PREFIX_DELEGATION; then + dhclient_stop "${zone}" ipv6 + fi + + exit ${EXIT_OK} +}