summaryrefslogtreecommitdiff
path: root/data/templates/pppoe
diff options
context:
space:
mode:
Diffstat (limited to 'data/templates/pppoe')
-rw-r--r--data/templates/pppoe/ipv6-up.script.tmpl8
1 files changed, 8 insertions, 0 deletions
diff --git a/data/templates/pppoe/ipv6-up.script.tmpl b/data/templates/pppoe/ipv6-up.script.tmpl
index 7e1bc33b4..238f8c28e 100644
--- a/data/templates/pppoe/ipv6-up.script.tmpl
+++ b/data/templates/pppoe/ipv6-up.script.tmpl
@@ -36,6 +36,14 @@ echo 1 > /proc/sys/net/ipv6/conf/{{ ifname }}/forwarding
#
echo 2 > /proc/sys/net/ipv6/conf/{{ ifname }}/accept_ra
+{% if default_route == 'none' %}
+# Prevent learning of default router from router advertisements
+echo 0 > /proc/sys/net/ipv6/conf/{{ ifname }}/accept_ra_defrtr
+{% else %}
+# Enable learning of default router from router advertisements
+echo 1 > /proc/sys/net/ipv6/conf/{{ ifname }}/accept_ra_defrtr
+{% endif %}
+
# Autoconfigure addresses using Prefix Information in Router Advertisements.
echo 1 > /proc/sys/net/ipv6/conf/{{ ifname }}/autoconf
{% endif %}