aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2013-01-29 10:13:33 +0000
committerSteven Barth <steven@midlink.org>2013-01-29 10:13:33 +0000
commit581546b6d23128a7c12278eed497ee0321db8578 (patch)
tree811be4b64d9c43e789705f097b999c15a33198d4
parent9140ba77f8c1f7d00677d0457d780645735d065a (diff)
downloadupstream-581546b6d23128a7c12278eed497ee0321db8578.tar.gz
upstream-581546b6d23128a7c12278eed497ee0321db8578.tar.bz2
upstream-581546b6d23128a7c12278eed497ee0321db8578.zip
base-files: Fix race-conditions with IPv6 sysctls
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35368 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--package/base-files/Makefile2
-rwxr-xr-xpackage/base-files/files/etc/init.d/boot3
-rw-r--r--package/base-files/files/etc/sysctl.conf3
-rw-r--r--package/base-files/files/etc/sysctl_early.conf3
4 files changed, 9 insertions, 2 deletions
diff --git a/package/base-files/Makefile b/package/base-files/Makefile
index 353b9ae392..8943c469d8 100644
--- a/package/base-files/Makefile
+++ b/package/base-files/Makefile
@@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/kernel.mk
include $(INCLUDE_DIR)/version.mk
PKG_NAME:=base-files
-PKG_RELEASE:=129
+PKG_RELEASE:=130
PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
PKG_BUILD_DEPENDS:=opkg/host
diff --git a/package/base-files/files/etc/init.d/boot b/package/base-files/files/etc/init.d/boot
index ef97383d8d..1800342367 100755
--- a/package/base-files/files/etc/init.d/boot
+++ b/package/base-files/files/etc/init.d/boot
@@ -95,6 +95,9 @@ start() {
rootdev=$(awk 'BEGIN { RS=" "; FS="="; } $1 == "root" { print $2 }' < /proc/cmdline)
[ -n "$rootdev" ] && ln -s "$rootdev" /dev/root
}
+
+ # run early sysctl
+ [ -f /etc/sysctl_early.conf ] && sysctl -p /etc/sysctl_early.conf -e >&-
}
stop() {
diff --git a/package/base-files/files/etc/sysctl.conf b/package/base-files/files/etc/sysctl.conf
index 1841dd4ca5..890e77af8e 100644
--- a/package/base-files/files/etc/sysctl.conf
+++ b/package/base-files/files/etc/sysctl.conf
@@ -12,7 +12,8 @@ net.ipv4.tcp_timestamps=1
net.ipv4.tcp_sack=1
net.ipv4.tcp_dsack=1
-net.ipv6.conf.default.forwarding=1
+net.ipv6.conf.default.forwarding=2
+net.ipv6.conf.all.forwarding=2
net.netfilter.nf_conntrack_acct=1
net.netfilter.nf_conntrack_checksum=0
diff --git a/package/base-files/files/etc/sysctl_early.conf b/package/base-files/files/etc/sysctl_early.conf
new file mode 100644
index 0000000000..6f2eeea040
--- /dev/null
+++ b/package/base-files/files/etc/sysctl_early.conf
@@ -0,0 +1,3 @@
+# Avoid race-conditions with SLAAC
+net.ipv6.conf.default.accept_ra=0
+net.ipv6.conf.all.accept_ra=0