From 8ddd158504f4a05bfe91645b347681ad56c8d471 Mon Sep 17 00:00:00 2001 From: cyrus Date: Tue, 29 Jan 2013 10:13:33 +0000 Subject: base-files: Fix race-conditions with IPv6 sysctls git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35368 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/base-files/files/etc/init.d/boot | 3 +++ package/base-files/files/etc/sysctl.conf | 3 ++- package/base-files/files/etc/sysctl_early.conf | 3 +++ 3 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 package/base-files/files/etc/sysctl_early.conf (limited to 'package/base-files/files') diff --git a/package/base-files/files/etc/init.d/boot b/package/base-files/files/etc/init.d/boot index ef97383d8..180034236 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 1841dd4ca..890e77af8 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 000000000..6f2eeea04 --- /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 -- cgit v1.2.3