summaryrefslogtreecommitdiffstats
path: root/rc.inet1
diff options
context:
space:
mode:
authorDarren 'Tadgy' Austin <darren@afterdark.org.uk>2021-03-08 21:38:15 +0000
committerDarren 'Tadgy' Austin <darren@afterdark.org.uk>2021-03-08 21:38:15 +0000
commit908f03bd53526adb20a56b91f2b343dc57ec6d02 (patch)
tree5f099448f97fddc7e6e6c2cf3e79586238d2c4b9 /rc.inet1
parentaeb252e2a4307a294d8483e4af52b747d7225535 (diff)
downloadslacknetsetup-908f03bd53526adb20a56b91f2b343dc57ec6d02.tar.xz
Move enabling RA before SLAAC security section. Thanks to davjohn on LQ.
Diffstat (limited to 'rc.inet1')
-rw-r--r--rc.inet116
1 files changed, 8 insertions, 8 deletions
diff --git a/rc.inet1 b/rc.inet1
index e809df0..d33ab77 100644
--- a/rc.inet1
+++ b/rc.inet1
@@ -329,6 +329,14 @@ if_up() {
IF_UP=0
if [ -e /proc/sys/net/ipv6 ] && [ "${USE_DHCP6[$i]}" != "yes" ] && [ "${USE_SLAAC[$i]}" = "yes" ]; then # configure via SLAAC
info_log "${1}: enabling SLAAC"
+ # Enable accepting of RA packets, unless explicitly configured not to:
+ if [ "${USE_RA[$i]}" = "no" ]; then
+ debug_log "${1}: ignoring IPv6 RA"
+ echo "0" >/proc/sys/net/ipv6/conf/${1}/accept_ra
+ else
+ debug_log "${1}: accepting IPv6 RA"
+ echo "1" >/proc/sys/net/ipv6/conf/${1}/accept_ra
+ fi
# Set up SLAAC privacy enhancements if configured.
if [ "${SLAAC_PRIVIPGEN[$i]}" = "yes" ]; then
if [ -n "${SLAAC_SECRET[$i]}" ]; then
@@ -345,14 +353,6 @@ if_up() {
debug_log "${1}: enabling SLAAC tempaddr"
echo "2" >/proc/sys/net/ipv6/conf/${1}/use_tempaddr
fi
- # Enable accepting of RA packets, unless explicitly configured not to:
- if [ "${USE_RA[$i]}" = "no" ]; then
- debug_log "${1}: ignoring IPv6 RA"
- echo "0" >/proc/sys/net/ipv6/conf/${1}/accept_ra
- else
- debug_log "${1}: accepting IPv6 RA"
- echo "1" >/proc/sys/net/ipv6/conf/${1}/accept_ra
- fi
# Enable auto configuration of interfaces:
echo "1" >/proc/sys/net/ipv6/conf/${1}/autoconf
# Bring the interface up: