diff options
author | initramfs <initramfs@initramfs.io> | 2022-08-26 09:17:06 +0800 |
---|---|---|
committer | initramfs <initramfs@initramfs.io> | 2022-08-27 14:07:28 +0800 |
commit | 8285902d3f4eab7038d086df9284eb3d538c693c (patch) | |
tree | d0fd5f6962fff34c78e29bdfa8d4a876e8407181 /data | |
parent | bf45a3c86afb532dbf136adda79fdfb402a7e175 (diff) | |
download | vyos-1x-8285902d3f4eab7038d086df9284eb3d538c693c.tar.gz vyos-1x-8285902d3f4eab7038d086df9284eb3d538c693c.zip |
pppoe: T4648: stop default route from being installed under IPv6
Adds a sysctl parameter to ignore the default router obtained from
router advertisements when pppoe default-route is set to 'none'.
Diffstat (limited to 'data')
-rw-r--r-- | data/templates/pppoe/ipv6-up.script.tmpl | 8 |
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 %} |