diff options
Diffstat (limited to 'target/linux/ar71xx/patches-4.4/910-unaligned_access_hacks.patch')
-rw-r--r-- | target/linux/ar71xx/patches-4.4/910-unaligned_access_hacks.patch | 25 |
1 files changed, 22 insertions, 3 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 b4b749e4b9..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 @@ -299,7 +299,7 @@ ptr--; } if (tunnel->parms.o_flags&GRE_KEY) { -@@ -836,7 +836,7 @@ static inline int ip6gre_xmit_ipv6(struc +@@ -838,7 +838,7 @@ static inline int ip6gre_xmit_ipv6(struc dsfield = ipv6_get_dsfield(ipv6h); if (t->parms.flags & IP6_TNL_F_USE_ORIG_TCLASS) @@ -310,7 +310,7 @@ if (t->parms.flags & IP6_TNL_F_USE_ORIG_FWMARK) --- a/net/ipv6/ip6_tunnel.c +++ b/net/ipv6/ip6_tunnel.c -@@ -1396,7 +1396,7 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, str +@@ -1386,7 +1386,7 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, str dsfield = ipv6_get_dsfield(ipv6h); if (t->parms.flags & IP6_TNL_F_USE_ORIG_TCLASS) @@ -491,7 +491,7 @@ memcpy(p, foc->val, foc->len); --- a/net/ipv4/igmp.c +++ b/net/ipv4/igmp.c -@@ -501,7 +501,7 @@ static struct sk_buff *add_grec(struct s +@@ -500,7 +500,7 @@ static struct sk_buff *add_grec(struct s if (!skb) return NULL; psrc = (__be32 *)skb_put(skb, sizeof(__be32)); @@ -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), |