aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2013-01-13 16:48:23 +0000
committerFelix Fietkau <nbd@openwrt.org>2013-01-13 16:48:23 +0000
commitcc1bb7b0342956b2487a335fa4b712919fa2432a (patch)
tree7313a5b355a134253496a3e909d309f4cbe3574f /target/linux
parent8953f9e8d79ee08446fd072f82f849514865bdb5 (diff)
downloadupstream-cc1bb7b0342956b2487a335fa4b712919fa2432a.tar.gz
upstream-cc1bb7b0342956b2487a335fa4b712919fa2432a.tar.bz2
upstream-cc1bb7b0342956b2487a335fa4b712919fa2432a.zip
ar71xx: fix unaligned access in cls_u32
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35132 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/ar71xx/patches-3.7/902-unaligned_access_hacks.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/target/linux/ar71xx/patches-3.7/902-unaligned_access_hacks.patch b/target/linux/ar71xx/patches-3.7/902-unaligned_access_hacks.patch
index 8806d866aa..fc05676b83 100644
--- a/target/linux/ar71xx/patches-3.7/902-unaligned_access_hacks.patch
+++ b/target/linux/ar71xx/patches-3.7/902-unaligned_access_hacks.patch
@@ -763,3 +763,25 @@
}
static inline struct neighbour *__ipv6_neigh_lookup(struct neigh_table *tbl, struct net_device *dev, const void *pkey)
+--- a/net/sched/cls_u32.c
++++ b/net/sched/cls_u32.c
+@@ -142,7 +142,7 @@ next_knode:
+ data = skb_header_pointer(skb, toff, 4, &hdata);
+ if (!data)
+ goto out;
+- if ((*data ^ key->val) & key->mask) {
++ if ((net_hdr_word(data) ^ key->val) & key->mask) {
+ n = n->next;
+ goto next_knode;
+ }
+@@ -193,8 +193,8 @@ check_terminal:
+ &hdata);
+ if (!data)
+ goto out;
+- sel = ht->divisor & u32_hash_fold(*data, &n->sel,
+- n->fshift);
++ sel = ht->divisor & u32_hash_fold(net_hdr_word(data),
++ &n->sel, n->fshift);
+ }
+ if (!(n->sel.flags & (TC_U32_VAROFFSET | TC_U32_OFFSET | TC_U32_EAT)))
+ goto next_ht;