diff options
-rw-r--r-- | rc.inet1 | 15 | ||||
-rw-r--r-- | rc.inet1.conf | 2 |
2 files changed, 14 insertions, 3 deletions
@@ -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. |