summaryrefslogtreecommitdiffstats
path: root/package/network/config/netifd/files/etc/hotplug.d/iface/10-ipv6-static
blob: 9f5b72716b4608f8f6c6f83a38ec73ea8bc611c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
case "$ACTION" in
	ifup)
		. /lib/functions.sh

		local proto ip6slaac
		config_load network
		config_get proto "$INTERFACE" proto
		config_get_bool ip6slaac "$INTERFACE" ip6slaac

		if [ "$proto" = "static" -a "$ip6slaac" = "1" ]; then
			echo 2 > "/proc/sys/net/ipv6/conf/$DEVICE/accept_ra"
			echo 2 > "/proc/sys/net/ipv6/conf/$DEVICE/forwarding"
		fi
	;;
esac