summaryrefslogtreecommitdiffstats
path: root/rc.inet1
diff options
context:
space:
mode:
authorDarren 'Tadgy' Austin <darren@afterdark.org.uk>2018-09-14 00:27:13 +0100
committerRobby Workman <rworkman@slackware.com>2018-11-26 02:04:37 -0600
commit5dcfe32331185127e8424414a7bc7cf05b5f95cd (patch)
tree49c3207101b88924ff64a9ca548c7f220a4fcff3 /rc.inet1
parent08ae2c2ada8b21ee3544c00b8a1042e8c1b2eb28 (diff)
downloadslacknetsetup-5dcfe32331185127e8424414a7bc7cf05b5f95cd.tar.xz
Added USE_RA[x] option to explicitly enable/disable RA support
Signed-off-by: Robby Workman <rworkman@slackware.com>
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