diff options
-rw-r--r-- | rc.inet1 | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -218,6 +218,10 @@ if_up() { # 15 seconds should be a reasonable default DHCP timeout. 30 was too much. echo "/etc/rc.d/rc.inet1: /sbin/dhcpcd -t ${DHCP_TIMEOUT[$i]:-15} ${DHCP_OPTIONS[@]} ${1}" | $LOGGER if /sbin/dhcpcd -t "${DHCP_TIMEOUT[$i]:-15}" "${DHCP_OPTIONS[@]}" ${1}; then + # Enable accepting of RA packets if explicitly told to. + if [ -e /proc/sys/net/ipv6 ] && [ "${USE_RA[$i]}" = "yes" ]; then + echo "1" >/proc/sys/net/ipv6/conf/$1/accept_ra + fi IF_UP=1 else echo "/etc/rc.d/rc.inet1: failed to obtain DHCP lease for ${1}" | $LOGGER @@ -278,6 +282,10 @@ if_up() { echo "/etc/rc.d/rc.inet1: /sbin/ip -6 address add ${IP6ADDR[$i]}/${PREFIXLEN[$i]#/} dev ${1}" | $LOGGER if /sbin/ip -6 address add ${IP6ADDR[$i]}/${PREFIXLEN[$i]#/} dev ${1} && \ /sbin/ip link set dev ${1} up; then + # Enable accepting of RA packets if explicitly told to. + if [ "${USE_RA[$i]}" = "yes" ]; then + echo "1" >/proc/sys/net/ipv6/conf/$1/accept_ra + fi IF_UP=1 else echo "/etc/rc.d/rc.inet1: failed to a set IP ${IP6ADDR[$i]} for ${1}" | $LOGGER |