From: Stefan Schantl Date: Sat, 5 Sep 2015 18:29:46 +0000 (+0000) Subject: pppoe-server: Enable IPv6 X-Git-Url: http://git.ipfire.org/?p=people%2Fstevee%2Fnetwork.git;a=commitdiff_plain;h=8efbf77e4c76b226d4b39a4081db53b4e46ea8a1 pppoe-server: Enable IPv6 Clients which support IPv6 will now be allocated a link-local IPv6 address. Signed-off-by: Stefan Schantl Signed-off-by: Michael Tremer --- diff --git a/src/functions/functions.pppoe-server b/src/functions/functions.pppoe-server index 5c9860b0..02e4b9a0 100644 --- a/src/functions/functions.pppoe-server +++ b/src/functions/functions.pppoe-server @@ -60,6 +60,7 @@ pppoe_server_options() { local auth="false" local default_asyncmap="true" local dns_servers + local ipv6="true" local lcp_echo_failure=5 local lcp_echo_interval=60 local proxyarp="true" @@ -74,6 +75,9 @@ pppoe_server_options() { --default-asyncmap=*) default_asyncmap=$(cli_get_val ${1}) ;; + --disable-ipv6) + ipv6="false" + ;; --dns-server=*) dns_servers="${dns_servers} $(cli_get_val ${1})" ;; @@ -120,6 +124,17 @@ pppoe_server_options() { print >> ${file} fi + # IPv6 + if enabled ipv6; then + # Generate a random gateway address + local gw_addr="::$(random 4):$(random 4)" + ( + print "# IPv6" + print "ipv6 ${gw_addr}" + print + ) >> ${file} + fi + # DNS servers if isset dns_servers; then print "# DNS servers" >> ${file}