From 01a266b469db733b92df0a0b8651d68e0aa536f6 Mon Sep 17 00:00:00 2001 From: Darren 'Tadgy' Austin Date: Sat, 28 Jul 2018 01:04:39 +0100 Subject: Add stateless RA auto configuration block Signed-off-by: Robby Workman --- rc.inet1 | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'rc.inet1') 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 -- cgit v1.2.3