aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/ipv6/odhcp6c/files
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2015-04-10 11:33:15 +0000
committerSteven Barth <steven@midlink.org>2015-04-10 11:33:15 +0000
commit8083f271be037f4e312d8e8c564e8ff87a8a9d27 (patch)
treeac024706f8c379cd2fe5ff343cfc06d1e68db4f8 /package/network/ipv6/odhcp6c/files
parentfb9ac42c42e25bdbeffc4b45b3e22fa8368c5740 (diff)
downloadupstream-8083f271be037f4e312d8e8c564e8ff87a8a9d27.tar.gz
upstream-8083f271be037f4e312d8e8c564e8ff87a8a9d27.tar.bz2
upstream-8083f271be037f4e312d8e8c564e8ff87a8a9d27.zip
odhcp6c: move IPv6 /proc config to userspace and sanitize
Signed-off-by: Steven Barth <steven@midlink.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45358 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/network/ipv6/odhcp6c/files')
-rwxr-xr-xpackage/network/ipv6/odhcp6c/files/dhcpv6.script7
1 files changed, 7 insertions, 0 deletions
diff --git a/package/network/ipv6/odhcp6c/files/dhcpv6.script b/package/network/ipv6/odhcp6c/files/dhcpv6.script
index 000e2dbae9..8cfa929002 100755
--- a/package/network/ipv6/odhcp6c/files/dhcpv6.script
+++ b/package/network/ipv6/odhcp6c/files/dhcpv6.script
@@ -154,6 +154,13 @@ setup_interface () {
ubus call network add_dynamic "$(json_dump)"
fi
+ # Apply IPv6 / ND configuration
+ HOPLIMIT=$(cat /proc/sys/net/ipv6/conf/$device/hop_limit)
+ [ "$RA_HOPLIMIT" -gt "$HOPLIMIT" ] && echo "$RA_HOPLIMIT" > /proc/sys/net/ipv6/conf/$device/hop_limit
+ [ "$RA_MTU" -gt 0 ] && echo "$RA_MTU" > /proc/sys/net/ipv6/conf/$device/mtu
+ [ "$RA_REACHABLE" -gt 0 ] && echo "$RA_REACHABLE" > /proc/sys/net/ipv6/neigh/$device/base_reachable_time_ms
+ [ "$RA_RETRANSMIT" -gt 0 ] && echo "$RA_RETRANSMIT" > /proc/sys/net/ipv6/neigh/$device/retrans_time_ms
+
# TODO: $SNTP_IP $SIP_IP $SNTP_FQDN $SIP_DOMAIN
}