aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorImre Kaloz <kaloz@openwrt.org>2008-04-30 10:57:03 +0000
committerImre Kaloz <kaloz@openwrt.org>2008-04-30 10:57:03 +0000
commit719fd8c757f3501dd1e0d4771922de1e50be4fe4 (patch)
tree811ba09482abe8a8f60dd605175e706f2a286c84 /target/linux
parentd05cc5d68da91255886c8da8d4babf2100ebaf8e (diff)
downloadupstream-719fd8c757f3501dd1e0d4771922de1e50be4fe4.tar.gz
upstream-719fd8c757f3501dd1e0d4771922de1e50be4fe4.tar.bz2
upstream-719fd8c757f3501dd1e0d4771922de1e50be4fe4.zip
revert conntrack optimization, as it's broken on arm
SVN-Revision: 10987
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/generic-2.6/patches-2.6.25/950-revert_conntrack_optimization.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/target/linux/generic-2.6/patches-2.6.25/950-revert_conntrack_optimization.patch b/target/linux/generic-2.6/patches-2.6.25/950-revert_conntrack_optimization.patch
new file mode 100644
index 0000000000..c146809f47
--- /dev/null
+++ b/target/linux/generic-2.6/patches-2.6.25/950-revert_conntrack_optimization.patch
@@ -0,0 +1,29 @@
+--- linux-2.6.25/net/netfilter/nf_conntrack_core.c 2008-04-17 04:49:44.000000000 +0200
++++ linux-2.6.25-owrt/net/netfilter/nf_conntrack_core.c 2008-04-30 12:36:55.000000000 +0200
+@@ -73,19 +73,15 @@
+ static u_int32_t __hash_conntrack(const struct nf_conntrack_tuple *tuple,
+ unsigned int size, unsigned int rnd)
+ {
+- unsigned int n;
+- u_int32_t h;
++ unsigned int a, b;
+
+- /* The direction must be ignored, so we hash everything up to the
+- * destination ports (which is a multiple of 4) and treat the last
+- * three bytes manually.
+- */
+- n = (sizeof(tuple->src) + sizeof(tuple->dst.u3)) / sizeof(u32);
+- h = jhash2((u32 *)tuple, n,
+- rnd ^ (((__force __u16)tuple->dst.u.all << 16) |
+- tuple->dst.protonum));
++ a = jhash2(tuple->src.u3.all, ARRAY_SIZE(tuple->src.u3.all),
++ (tuple->src.l3num << 16) | tuple->dst.protonum);
++ b = jhash2(tuple->dst.u3.all, ARRAY_SIZE(tuple->dst.u3.all),
++ ((__force __u16)tuple->src.u.all << 16) |
++ (__force __u16)tuple->dst.u.all);
+
+- return ((u64)h * size) >> 32;
++ return ((u64)jhash_2words(a, b, rnd) * size) >> 32;
+ }
+
+ static inline u_int32_t hash_conntrack(const struct nf_conntrack_tuple *tuple)