base-files: Fix race-conditions with IPv6 sysctls
authorSteven Barth <cyrus@openwrt.org>
Tue, 29 Jan 2013 10:13:33 +0000 (10:13 +0000)
committerSteven Barth <cyrus@openwrt.org>
Tue, 29 Jan 2013 10:13:33 +0000 (10:13 +0000)
SVN-Revision: 35368

package/base-files/Makefile
package/base-files/files/etc/init.d/boot
package/base-files/files/etc/sysctl.conf
package/base-files/files/etc/sysctl_early.conf [new file with mode: 0644]

index 353b9ae3929d5399d5569601ef70974876b2bebc..8943c469d83fb6c3fb604dae9f77be87d8d9ebbe 100644 (file)
@@ -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
index ef97383d8d9c4b7b47bd87df599dd349b33a5444..18003423676e2ef69f3bf6ae96794efd1452e980 100755 (executable)
@@ -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() {
index 1841dd4ca5916456438bd0e7e3bda05c0e6ea5d0..890e77af8ef8b18855156f33230c93077fc05e64 100644 (file)
@@ -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 (file)
index 0000000..6f2eeea
--- /dev/null
@@ -0,0 +1,3 @@
+# Avoid race-conditions with SLAAC
+net.ipv6.conf.default.accept_ra=0
+net.ipv6.conf.all.accept_ra=0