aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/config/netifd/files
diff options
context:
space:
mode:
authorSteven Barth <cyrus@openwrt.org>2013-01-28 13:53:48 +0000
committerSteven Barth <cyrus@openwrt.org>2013-01-28 13:53:48 +0000
commit75b06607db4876ef6a67adc831971a5e53183039 (patch)
tree366525d6931f3313368b1e9a631eb470e4c1e434 /package/network/config/netifd/files
parente964fa5d8f49edc5e731a82b1600313369b0ecaf (diff)
downloadupstream-75b06607db4876ef6a67adc831971a5e53183039.tar.gz
upstream-75b06607db4876ef6a67adc831971a5e53183039.tar.bz2
upstream-75b06607db4876ef6a67adc831971a5e53183039.zip
netifd: add SLAAC ipv6 value for static-proto
SVN-Revision: 35346
Diffstat (limited to 'package/network/config/netifd/files')
-rw-r--r--package/network/config/netifd/files/etc/hotplug.d/iface/10-ipv6-static16
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 0000000000..9f5b72716b
--- /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
+