]> git.ipfire.org Git - people/ms/network.git/commitdiff
pppoe: Enable PD by default
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 31 Jan 2015 13:19:03 +0000 (13:19 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 31 Jan 2015 13:19:03 +0000 (13:19 +0000)
DHCPv6 prefix deleagtion is enabled by default and will
be executed when ever there is IPv6 connectivity on the
PPP link.

src/hooks/zones/pppoe

index 100c8a762f91bad3e52ee9cf9072995e0a602a75..fa3f4ed6cea12eae693c766ac39721b5221e45b5 100644 (file)
@@ -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}
+}