netifd: IPv6 sysctl, restart IPv6 in static mode to send RS
[openwrt/openwrt.git] / package / network / config / netifd / files / etc / hotplug.d / iface / 10-ipv6-static
1 case "$ACTION" in
2 ifup)
3 . /lib/functions.sh
4
5 local proto ip6slaac
6 config_load network
7 config_get proto "$INTERFACE" proto
8 config_get_bool ip6slaac "$INTERFACE" ip6slaac
9
10 if [ "$proto" = "static" -a "$ip6slaac" = "1" ]; then
11 echo 2 > "/proc/sys/net/ipv6/conf/$DEVICE/accept_ra"
12 echo 2 > "/proc/sys/net/ipv6/conf/$DEVICE/forwarding"
13
14 # Though this should be save here, it is not recommended
15 echo 1 > "/proc/sys/net/ipv6/conf/$DEVICE/disable_ipv6"
16 echo 0 > "/proc/sys/net/ipv6/conf/$DEVICE/disable_ipv6"
17 fi
18 ;;
19 esac
20