summaryrefslogtreecommitdiffstats
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
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>
-rw-r--r--rc.inet115
-rw-r--r--rc.inet1.conf2
2 files changed, 14 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
diff --git a/rc.inet1.conf b/rc.inet1.conf
index c1e1060..2e2a0be 100644
--- a/rc.inet1.conf
+++ b/rc.inet1.conf
@@ -159,6 +159,8 @@ DEBUG_ETH_UP="no"
#SLAAC_TIMEOUT[4]="15" # The default timeout for auto configuration to
# wait for the interface to come up is 15 sec.
# Increase the timeout if required.
+#USE_RA[4]="yes" # Accept router advertisements even when SLAAC
+ # is disabled on the interface.
#WLAN_ESSID[4]=DARKSTAR # An example of how you can override _any_
# parameter defined in rc.wireless.conf, by
# prepending 'WLAN_' to the parameter's name.