summaryrefslogtreecommitdiffstats
path: root/rc.inet1
diff options
context:
space:
mode:
Diffstat (limited to 'rc.inet1')
-rw-r--r--rc.inet115
1 files changed, 12 insertions, 3 deletions
diff --git a/rc.inet1 b/rc.inet1
index 6668c44..ca916b4 100644
--- a/rc.inet1
+++ b/rc.inet1
@@ -186,7 +186,11 @@ if_up() {
# Disable v6 IP auto configuration before trying to bring up the interface:
echo "0" >/proc/sys/net/ipv6/conf/$1/autoconf
# Disable Router Advertisment for this interface until it's needed:
- echo "0" >/proc/sys/net/ipv6/conf/$1/accept_ra
+ if [ "${USE_RA[$i]}" = "yes" ]; then
+ echo "1" >/proc/sys/net/ipv6/conf/$1/accept_ra
+ else
+ echo "0" >/proc/sys/net/ipv6/conf/$1/accept_ra
+ fi
fi
local IF_UP=0
# Slackware historically favours dynamic configuration over fixed IP to configure interfaces, so keep that tradition:
@@ -225,8 +229,13 @@ if_up() {
fi
if [ -e /proc/sys/net/ipv6 ] && [ "${USE_DHCP6[$i]}" != "yes" ] && [ "${USE_SLAAC[$i]}" = "yes" ]; then # configure via SLAAC
echo "/etc/rc.d/rc.inet1: using Router Advertisement stateless auto configuration for ${1}" | $LOGGER
- # Enable accepting of router advertisment packets, and auto configuration of interfaces:
- echo "1" >/proc/sys/net/ipv6/conf/$1/accept_ra
+ # Enable accepting of RA packets, unless explicitly configured not to.
+ if [ "${USE_RA[$i]}" = "no" ]; then
+ echo "0" >/proc/sys/net/ipv6/conf/$1/accept_ra
+ else
+ 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:
/sbin/ip link set dev ${1} up