diff options
author | cyrus <cyrus@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2013-01-28 13:53:48 +0000 |
---|---|---|
committer | cyrus <cyrus@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2013-01-28 13:53:48 +0000 |
commit | 366c624699f0b52cb5ec0630191e14561d8723ef (patch) | |
tree | 7b9f383965e3779c1cfa6a6989c4cd99250db846 /package/network/config/netifd/files/etc/hotplug.d/iface | |
parent | 230548a08e9633880866e23e9a9b5cb6333c5dcf (diff) |
netifd: add SLAAC ipv6 value for static-proto
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35346 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/network/config/netifd/files/etc/hotplug.d/iface')
-rw-r--r-- | package/network/config/netifd/files/etc/hotplug.d/iface/10-ipv6-static | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/package/network/config/netifd/files/etc/hotplug.d/iface/10-ipv6-static b/package/network/config/netifd/files/etc/hotplug.d/iface/10-ipv6-static new file mode 100644 index 000000000..9f5b72716 --- /dev/null +++ b/package/network/config/netifd/files/etc/hotplug.d/iface/10-ipv6-static @@ -0,0 +1,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 + |