aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/patches-4.4
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2016-06-21 16:21:30 +0200
committerZoltan HERPAI <wigyori@uid0.hu>2016-06-21 16:21:30 +0200
commit1fdc2c21c30c6b3309eb4ccb4a970c6c664beadb (patch)
tree53981dd230572358638d0b1fddcdaedc8458c261 /target/linux/ar71xx/patches-4.4
parent9cb35e0499e49a24b480f14e4bab23f94a23aa87 (diff)
downloadmaster-187ad058-1fdc2c21c30c6b3309eb4ccb4a970c6c664beadb.tar.gz
master-187ad058-1fdc2c21c30c6b3309eb4ccb4a970c6c664beadb.tar.bz2
master-187ad058-1fdc2c21c30c6b3309eb4ccb4a970c6c664beadb.zip
ar71xx: fix a remaining unaligned access issue
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'target/linux/ar71xx/patches-4.4')
-rw-r--r--target/linux/ar71xx/patches-4.4/910-unaligned_access_hacks.patch19
1 files changed, 19 insertions, 0 deletions
diff --git a/target/linux/ar71xx/patches-4.4/910-unaligned_access_hacks.patch b/target/linux/ar71xx/patches-4.4/910-unaligned_access_hacks.patch
index 17e4606506..17a53ed6e6 100644
--- a/target/linux/ar71xx/patches-4.4/910-unaligned_access_hacks.patch
+++ b/target/linux/ar71xx/patches-4.4/910-unaligned_access_hacks.patch
@@ -910,3 +910,22 @@
/* Values for "flag" field in struct arpt_ip (general arp structure).
* No flags defined yet.
+--- a/net/core/utils.c
++++ b/net/core/utils.c
+@@ -321,8 +321,14 @@ void inet_proto_csum_replace16(__sum16 *
+ bool pseudohdr)
+ {
+ __be32 diff[] = {
+- ~from[0], ~from[1], ~from[2], ~from[3],
+- to[0], to[1], to[2], to[3],
++ ~net_hdr_word(&from[0]),
++ ~net_hdr_word(&from[1]),
++ ~net_hdr_word(&from[2]),
++ ~net_hdr_word(&from[3]),
++ net_hdr_word(&to[0]),
++ net_hdr_word(&to[1]),
++ net_hdr_word(&to[2]),
++ net_hdr_word(&to[3]),
+ };
+ if (skb->ip_summed != CHECKSUM_PARTIAL) {
+ *sum = csum_fold(csum_partial(diff, sizeof(diff),