summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--rc.inet18
1 files changed, 8 insertions, 0 deletions
diff --git a/rc.inet1 b/rc.inet1
index 02c1193..6f3df52 100644
--- a/rc.inet1
+++ b/rc.inet1
@@ -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