summaryrefslogtreecommitdiffstats
path: root/rc.inet1
diff options
context:
space:
mode:
Diffstat (limited to 'rc.inet1')
-rw-r--r--rc.inet110
1 files changed, 10 insertions, 0 deletions
diff --git a/rc.inet1 b/rc.inet1
index 8701c9f..c552016 100644
--- a/rc.inet1
+++ b/rc.inet1
@@ -250,7 +250,17 @@ if_up() {
fi
elif [ "${USE_STATELESS[$i]}" = "yes" ]; then # interface should configure itself via stateless RA auto config
echo "/etc/rc.d/rc.inet1: using stateless Router Advertisement auto configuration for ${1}" | $LOGGER
+ echo "1" >/proc/sys/net/ipv6/conf/$1/accept_ra
echo "1" >/proc/sys/net/ipv6/conf/$1/autoconf
+ /sbin/ip link set dev ${1} up
+ for i in {1..10}; do # Give some time for the interface to configure
+ /sbin/ip -6 address show dynamic dev ${1} 2>/dev/null | grep -Ewq 'inet6' && break
+ sleep 1
+ done
+ if ! /sbin/ip -6 address show dynamic dev ${1} 2>/dev/null | grep -Ewq 'inet6'; then
+ echo "/etc/rc.d/rc.inet1: failed to auto configure ${1} after 10 seconds" | $LOGGER
+ fi
+ return
else # interface is unconfigured
debug_log "${1} interface is not configured in /etc/rc.d/rc.inet1.conf"
fi