From 908f03bd53526adb20a56b91f2b343dc57ec6d02 Mon Sep 17 00:00:00 2001 From: Darren 'Tadgy' Austin Date: Mon, 8 Mar 2021 21:38:15 +0000 Subject: Move enabling RA before SLAAC security section. Thanks to davjohn on LQ. --- rc.inet1 | 16 ++++++++-------- 1 file 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: -- cgit v1.2.3